use of org.mule.test.heisenberg.extension.model.PersonalInfo in project mule by mulesoft.
the class SingleValueResolverTestCase method set.
@Test
public void set() throws Exception {
PersonalInfo info = new PersonalInfo();
valueSetter.set(info, result);
assertThat(info.getName(), is(NAME));
}
use of org.mule.test.heisenberg.extension.model.PersonalInfo in project mule by mulesoft.
the class OperationExecutionTestCase method getInlineGroupPersonalInfoAsArgument.
@Test
public void getInlineGroupPersonalInfoAsArgument() throws Exception {
Message message = flowRunner("getInlinePersonalInfo").withPayload(EMPTY_STRING).run().getMessage();
assertThat(message.getPayload().getValue(), is(notNullValue()));
PersonalInfo value = (PersonalInfo) message.getPayload().getValue();
assertThat(value.getAge(), is(26));
assertThat(value.getKnownAddresses().get(0), is("explicitAddress"));
assertThat(value.getName(), is("Pepe"));
}
use of org.mule.test.heisenberg.extension.model.PersonalInfo in project mule by mulesoft.
the class DefaultObjectBuilderTestCase method reusable.
@Test
public void reusable() throws Exception {
populate(false);
PersonalInfo info1 = builder.build(resolvingContext);
PersonalInfo info2 = builder.build(resolvingContext);
PersonalInfo info3 = builder.build(resolvingContext);
assertThat(info1, is(not(sameInstance(info2))));
assertThat(info1, is(not(sameInstance(info3))));
verify(info1);
verify(info2);
verify(info3);
}
use of org.mule.test.heisenberg.extension.model.PersonalInfo in project mule by mulesoft.
the class DefaultObjectBuilderTestCase method build.
@Test
public void build() throws Exception {
populate(false);
PersonalInfo personalInfo = builder.build(resolvingContext);
verify(personalInfo);
}
use of org.mule.test.heisenberg.extension.model.PersonalInfo in project mule by mulesoft.
the class GroupValueSetterTestCase method before.
@Before
public void before() throws Exception {
final String personalInfo = "personalInfo";
ParameterGroupDescriptor group = new ParameterGroupDescriptor("group", new TypeWrapper(PersonalInfo.class, new JavaTypeLoader(Thread.currentThread().getContextClassLoader())), ExtensionsTypeLoaderFactory.getDefault().createTypeLoader().load(PersonalInfo.class), getField(HeisenbergExtension.class, personalInfo, reflectionCache).get(), null);
Map<String, Object> resultMap = new HashMap<>();
resultMap.put("name", NAME);
resultMap.put("age", AGE);
resultMap.put("dateOfBirth", DATE);
when(result.asMap()).thenReturn(resultMap);
valueSetter = new GroupValueSetter(group, () -> reflectionCache);
}
Aggregations