Exemplo n.º 1
0
  @Before
  public void before() {
    R1 = new Resume("Полное Имя 1", "location1");
    R1.addContact(ContactType.MAIL, "*****@*****.**");
    R1.addContact(ContactType.PHONE, "11111");

    if (storage.isSectionSupported()) {
      R1.addObjective("Objective1");
      R1.addMultiTextSection(SectionType.ACHIEVEMENT, "Achivment11", "Achivment12");
      R1.addMultiTextSection(SectionType.QUALIFICATIONS, "Java", "Sql");
      R1.addOrganizationSection(
          SectionType.EXPERIENCE,
          new Organization(
              "Organization11",
              null,
              new Organization.Period(
                  LocalDate.of(2005, Month.JANUARY, 1),
                  Organization.Period.NOW,
                  "position1",
                  "content1"),
              new Organization.Period(
                  2001, Month.MARCH, 2005, Month.JANUARY, "position2", "content2")),
          new Organization("Organization12", "http://Organization12.ru"));

      R1.addOrganizationSection(
          SectionType.EDUCATION,
          new Organization(
              "Institute",
              null,
              new Organization.Period(
                  1996, Month.JANUARY, 2001, Month.DECEMBER, "aspirant", "IT facultet"),
              new Organization.Period(
                  2001, Month.MARCH, 2005, Month.JANUARY, "student", "IT facultet")),
          new Organization("Organization12", "http://Organization12.ru"));
    }

    R2 = new Resume("Полное Имя 2", "location2");
    R2.addContact(ContactType.SKYPE, "skype2");
    R2.addContact(ContactType.PHONE, "22222");

    R3 = new Resume("Полное Имя 3", "");

    storage.clear();

    storage.save(R3);
    storage.save(R1);
    storage.save(R2);
  }
Exemplo n.º 2
0
 @org.junit.Test
 public void testUpdate() throws Exception {
   R2.setFullName("Updated N2");
   storage.update(R2);
   Assert.assertEquals(R2, storage.load(R2.getUuid()));
 }
Exemplo n.º 3
0
 @org.junit.Test
 public void testLoad() throws Exception {
   Assert.assertEquals(R1, storage.load(R1.getUuid()));
   Assert.assertEquals(R2, storage.load(R2.getUuid()));
   Assert.assertEquals(R3, storage.load(R3.getUuid()));
 }
Exemplo n.º 4
0
 @org.junit.Test
 public void testDelete() throws Exception {
   storage.delete(R1.getUuid());
   Assert.assertEquals(2, storage.size());
 }