@Test
public void shouldReturnRequiredCycle3AttributesWhenValuesExistInCycle3Assertion(){
List<Attribute> accountCreationAttributes = Arrays.asList(CYCLE_3).stream()
.map(attributeQueryAttributeFactory::createAttribute)
.collect(toList());
ImmutableMap<String, String> build = ImmutableMap.<String, String>builder().put("cycle3Key", "cycle3Value").build();
Cycle3Dataset cycle3Dataset = Cycle3Dataset.createFromData(build);
HubAssertion hubAssertion =new HubAssertion("1", "issuerId", DateTime.now(), new PersistentId("1"), null, Optional.of(cycle3Dataset));
List<Attribute> userAttributesForAccountCreation = userAccountCreationAttributeExtractor.getUserAccountCreationAttributes(accountCreationAttributes, null, Optional.of(hubAssertion));
List<Attribute> cycle_3 = userAttributesForAccountCreation.stream().filter(a -> a.getName().equals("cycle_3")).collect(toList());
StringBasedMdsAttributeValue personName = (StringBasedMdsAttributeValue) cycle_3.get(0).getAttributeValues().get(0);
assertThat(cycle_3.size()).isEqualTo(1);
assertThat(personName.getValue().equals("cycle3Value"));
}
UserAccountCreationAttributeExtractorTest.java 文件源码
java
阅读 32
收藏 0
点赞 0
评论 0
项目:verify-matching-service-adapter
作者:
评论列表
文章目录