Example #1
0
 @Test
 public void shouldNotHaveNunsuchSpreadsheet() throws Exception {
   // when
   GoogleSpreadsheet spreadsheet = helperUnderTest.getSpreadsheet("Nunsuch");
   // then
   assertThat(spreadsheet).isNull();
 }
Example #2
0
 @Test
 public void shouldBeMultipleSpreadsheets() throws Exception {
   // when
   List<GoogleSpreadsheet> spreadsheets = helperUnderTest.getAllSpreadsheets();
   // then
   assertThat(spreadsheets).isNotEmpty();
 }
Example #3
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");
 }
Example #4
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();
  }
Example #5
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;
  }
Example #6
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");
  }