Пример #1
0
 @Test
 public void shouldHaveMessagesSpreadsheet() throws Exception {
   // when
   GoogleSpreadsheet spreadsheet = helperUnderTest.getSpreadsheet("zGData Test Sheet");
   // then
   assertThat(spreadsheet).isNotNull();
   assert spreadsheet != null;
   assertThat(spreadsheet.getTitle()).isEqualTo("zGData Test Sheet");
 }
Пример #2
0
  @Test
  public void shouldNotHaveMessagesSpreadsheetNunsuchWorksheet() throws Exception {
    // when
    GoogleSpreadsheet spreadsheet = helperUnderTest.getSpreadsheet("zGData Test Sheet");
    assertThat(spreadsheet).isNotNull();
    assert spreadsheet != null;

    GoogleWorksheet worksheet = spreadsheet.getWorksheet("Nunsuch");

    // then
    assertThat(worksheet).isNull();
  }
Пример #3
0
  @BeforeClass
  public static void beforeEachTest() throws Exception {
    helperUnderTest = new GoogleHelper("org-wolm-testing");

    GoogleSpreadsheet spreadsheet = helperUnderTest.getSpreadsheet("zGData Test Sheet");
    assert spreadsheet != null;

    GoogleWorksheet worksheet = spreadsheet.getWorksheet("Persons");
    assert worksheet != null;

    rowsUnderTest = worksheet.getRows();
    assert rowsUnderTest != null;
  }
Пример #4
0
  @Test
  public void shouldHaveMessagesSpreadsheetWorksheets() throws Exception {
    // when
    GoogleSpreadsheet spreadsheet = helperUnderTest.getSpreadsheet("zGData Test Sheet");
    assertThat(spreadsheet).isNotNull();
    assert spreadsheet != null;
    GoogleWorksheet persons = spreadsheet.getWorksheet("Persons");
    GoogleWorksheet jobs = spreadsheet.getWorksheet("Jobs");
    // then
    assertThat(persons).isNotNull();
    assert persons != null;
    assertThat(persons.getTitle()).isEqualTo("Persons");

    assertThat(jobs).isNotNull();
    assert jobs != null;
    assertThat(jobs.getTitle()).isEqualTo("Jobs");
  }