Search in sources :

Example 96 with Person

use of spold2.Person in project kripton by xcesco.

the class TestRuntimeNamespace3 method testRun.

/**
 * Test run.
 *
 * @throws Exception the exception
 */
@Test
public void testRun() throws Exception {
    Person person = new Person();
    person.birthday = new Date();
    person.name = "toni";
    person.surname = "manero";
    person.tags = new ArrayList<String>();
    person.tags.add("test1");
    check(person);
}
Also used : Person(bind.feature.namespace.case3.Person) Date(java.util.Date) Test(org.junit.Test) AbstractBaseTest(bind.AbstractBaseTest)

Example 97 with Person

use of spold2.Person in project kripton by xcesco.

the class TestRuntimeNamespace4 method testRun.

/**
 * Test run.
 *
 * @throws Exception the exception
 */
@Test
public void testRun() throws Exception {
    Person person = new Person();
    person.birthday = new Date();
    person.name = "toni";
    person.surname = "manero";
    person.tags = new HashMap<String, String>();
    person.tags.put("test1", "test2");
    check(person);
}
Also used : Person(bind.feature.namespace.case4.Person) Date(java.util.Date) Test(org.junit.Test) AbstractBaseTest(bind.AbstractBaseTest)

Example 98 with Person

use of spold2.Person in project olca-modules by GreenDelta.

the class ProcessDoc method addPerson.

private Person addPerson(Actor actor) {
    for (Person person : dataSet.masterData.persons) {
        if (Objects.equals(actor.refId, person.id))
            return person;
    }
    Person person = new Person();
    person.id = actor.refId;
    person.name = actor.name;
    person.address = getAddress(actor);
    String email = actor.email != null ? actor.email : "no@mail.net";
    person.email = email;
    person.name = actor.name;
    person.telefax = actor.telefax;
    person.telephone = actor.telephone;
    person.companyId = "b35ea934-b41d-4830-b1aa-c7c678270240";
    person.company = "UKNWN";
    dataSet.masterData.persons.add(person);
    addDefaultCompany();
    return person;
}
Also used : Person(spold2.Person)

Example 99 with Person

use of spold2.Person in project olca-modules by GreenDelta.

the class ProcessDoc method mapDataGenerator.

private void mapDataGenerator(AdminInfo adminInfo) {
    DataGenerator generator = new DataGenerator();
    adminInfo.dataGenerator = generator;
    generator.isCopyrightProtected = doc.copyright;
    mapPublication(generator);
    Actor actor = doc.dataGenerator;
    if (actor == null) {
        generator.personEmail = "no@email.com";
        generator.personId = "788d0176-a69c-4de0-a5d3-259866b6b100";
        generator.personName = "[Current User]";
    } else {
        Person person = addPerson(actor);
        generator.personEmail = person.email;
        generator.personId = person.id;
        generator.personName = person.email;
    }
}
Also used : DataGenerator(spold2.DataGenerator) Actor(org.openlca.core.model.Actor) Person(spold2.Person)

Example 100 with Person

use of spold2.Person in project practice-codes by ParkJiwoon.

the class CachePersonRepositoryTest method test.

@Test
@DisplayName("캐시 적용한 PersonRepository 저장/찾기 테스트 하면 찾을 때 Real Repo 는 조회 안함")
void test() {
    // given
    Person person = new Person(1L, "woody", 30);
    // when
    cachePersonRepository.save(person);
    // then
    Person findPerson = cachePersonRepository.find(1L);
    assertThat(person).isEqualTo(findPerson);
}
Also used : Person(com.example.springbootcache.v1.Person) Test(org.junit.jupiter.api.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest) DisplayName(org.junit.jupiter.api.DisplayName)

Aggregations

Test (org.junit.Test)81 Person (org.orcid.jaxb.model.record_v2.Person)60 Email (org.orcid.jaxb.model.record_v2.Email)36 OtherName (org.orcid.jaxb.model.record_v2.OtherName)32 PersonExternalIdentifier (org.orcid.jaxb.model.record_v2.PersonExternalIdentifier)32 Address (org.orcid.jaxb.model.record_v2.Address)31 Emails (org.orcid.jaxb.model.record_v2.Emails)31 ResearcherUrl (org.orcid.jaxb.model.record_v2.ResearcherUrl)31 Keyword (org.orcid.jaxb.model.record_v2.Keyword)30 Name (org.orcid.jaxb.model.record_v2.Name)28 Addresses (org.orcid.jaxb.model.record_v2.Addresses)26 Biography (org.orcid.jaxb.model.record_v2.Biography)26 OtherNames (org.orcid.jaxb.model.record_v2.OtherNames)26 ResearcherUrls (org.orcid.jaxb.model.record_v2.ResearcherUrls)26 Keywords (org.orcid.jaxb.model.record_v2.Keywords)25 PersonExternalIdentifiers (org.orcid.jaxb.model.record_v2.PersonExternalIdentifiers)25 Record (org.orcid.jaxb.model.record_v2.Record)22 ActivitiesSummary (org.orcid.jaxb.model.record.summary_v2.ActivitiesSummary)20 WorkSummary (org.orcid.jaxb.model.record.summary_v2.WorkSummary)15 EducationSummary (org.orcid.jaxb.model.record.summary_v2.EducationSummary)14