use of data.Person in project micronaut-coherence by micronaut-projects.
the class CoherenceTopicListenerTest method shouldHaveSubscribedWithFilter.
@Test
void shouldHaveSubscribedWithFilter() throws Exception {
try (Publisher<Person> publisher = getPublisher("Three")) {
Person homer = new Person("Homer", "Simpson", LocalDate.now(), null);
publisher.publish(new Person("Ned", "Flanders", LocalDate.now(), null));
publisher.publish(homer);
publisher.publish(new Person("Apu", "Nahasapeemapetilon", LocalDate.now(), null));
assertThat(listenerOne.latchThree.await(1, TimeUnit.MINUTES), is(true));
assertThat(listenerOne.messageThree, is(notNullValue()));
assertThat(listenerOne.messageThree, is(homer));
}
}
use of data.Person in project micronaut-coherence by micronaut-projects.
the class CoherenceTopicListenerTest method shouldHaveSubscribedWithConverter.
@Test
void shouldHaveSubscribedWithConverter() throws Exception {
try (Publisher<Person> publisher = getPublisher("People")) {
publisher.publish(new Person("Homer", "Simpson", LocalDate.now(), null));
assertThat(listenerOne.latchPeopleConverted.await(1, TimeUnit.MINUTES), is(true));
assertThat(listenerOne.messagePeopleConverted, is(notNullValue()));
assertThat(listenerOne.messagePeopleConverted, is("Homer"));
}
}
use of data.Person in project micronaut-coherence by micronaut-projects.
the class NamedCacheFactoriesViewTest method populate.
private void populate(NamedCache<String, Person> cache) {
for (int i = 0; i < 100; i++) {
String lastName = (i % 2 == 0) ? "foo" : "bar";
Person bean = new Person(String.valueOf(i), lastName, LocalDate.now(), new PhoneNumber(44, "12345" + i));
cache.put(lastName + "-" + i, bean);
}
}
use of data.Person in project tapestry-5 by apache.
the class GenericLoopDemo method beginRender.
void beginRender() {
integerSource = Arrays.asList(1, 3, 5, 7, 11);
personSource = new ArrayList<Person>();
Person person = new Person();
person.setAge(25);
person.setName("John Doe");
personSource.add(person);
person = new Person();
person.setAge(53);
person.setName("Jane Dover");
personSource.add(person);
person = new Person();
person.setAge(13);
person.setName("James Jackson");
personSource.add(person);
}
Aggregations