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