<commit_before>package by.stqa.pft.addressbook.tests;

/**
 * Created by Artsiom on 4/1/2017.
 */
public class ContactAddressTests {
}<commit_msg>The tests have been implemented to verify phones, addresses and emails<commit_after>package by.stqa.pft.addressbook.tests;

import by.stqa.pft.addressbook.model.ContactData;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.MatcherAssert.assertThat;

/**
 * Created by Artsiom on 4/1/2017.
 */
public class ContactAddressTests extends TestBase{

  @BeforeMethod
  public void ensurePreconditions() {
    if (app.contact().all().size() == 0) {
      app.contact().create(new ContactData().withFirstname("Bob").withLastname("Marley").withAddress("Jamaica").withHomephone("911").withMobilephone("+74563912")
              .withWorkphone("(123)6758394").withEmail1("<EMAIL>").withEmail2("<EMAIL>").withEmail3("<EMAIL>").withGroup("test07"));
    }
  }

  @Test
  public void testContactAddress() {
    app.goTo().homePage();
    ContactData contact = app.contact().all().iterator().next();
    ContactData contactInfoFromEditForm = app.contact().infoFromEditForm(contact);
    assertThat(contact.getAddress(), equalTo(contactInfoFromEditForm.getAddress()));
  }
}

{'fraction_non_alphanumeric': 0.1485148514851485, 'fraction_numerical': 0.0297029702970297, 'mean_word_length': 5.2274881516587675, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3233125', 'n_tokens_mistral': 425, 'n_tokens_neox': 401, 'n_words': 67}