Search in sources :

Example 16 with Person

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));
    }
}
Also used : Person(data.Person) MicronautTest(io.micronaut.test.extensions.junit5.annotation.MicronautTest) Test(org.junit.jupiter.api.Test)

Example 17 with Person

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"));
    }
}
Also used : Person(data.Person) MicronautTest(io.micronaut.test.extensions.junit5.annotation.MicronautTest) Test(org.junit.jupiter.api.Test)

Example 18 with Person

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);
    }
}
Also used : PhoneNumber(data.PhoneNumber) Person(data.Person)

Example 19 with Person

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);
}
Also used : Person(org.apache.tapestry5.integration.app1.data.Person)

Aggregations

Person (data.Person)17 Test (org.junit.jupiter.api.Test)11 PhoneNumber (data.PhoneNumber)10 MicronautTest (io.micronaut.test.extensions.junit5.annotation.MicronautTest)5 Serializer (com.tangosol.io.Serializer)2 BackingMapContext (com.tangosol.net.BackingMapContext)2 BackingMapBinaryEntry (com.tangosol.net.cache.BackingMapBinaryEntry)2 Subscriber (com.tangosol.net.topic.Subscriber)2 MapEvent (com.tangosol.util.MapEvent)2 ExecutionException (exceptions.ExecutionException)2 HashMap (java.util.HashMap)2 Person (org.apache.tapestry5.integration.app1.data.Person)2 BeforeEach (org.junit.jupiter.api.BeforeEach)2 Coherence (com.tangosol.net.Coherence)1 CacheMap (com.tangosol.net.cache.CacheMap)1 ConcurrentMap (com.tangosol.util.ConcurrentMap)1 InvocableMap (com.tangosol.util.InvocableMap)1 MapIndex (com.tangosol.util.MapIndex)1 ObservableMap (com.tangosol.util.ObservableMap)1 QueryMap (com.tangosol.util.QueryMap)1