Test smells: exceptions

A test written by “Senior Java Developer”.

Bravo, Mr Senior!! 🙂

@Test
  public void StaticInitBlock_NonDefaultProfile_LocalDataRepositoryWithoutIssueDir_ConfigurationErrorIsThrown() {
    //given
    nonDefaultProfile();
    System.setProperty("RunConfig_dataRepository", "Local");
    //when
    try {
      staticInitBlock();
    } catch (Throwable e) {
    //then
      Assert.assertTrue(e instanceof ConfigurationError);
    }
  }
Advertisements