Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbrowndotje committed Jan 10, 2024
1 parent 5389f42 commit e6d97bf
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ void copyConfigurationFrom() {
void setTheme_WithAUrl() {
Configuration configuration = new Configuration();
configuration.setTheme("https://example.com/theme.json");
assertEquals("https://example.com/theme.json", configuration.getTheme());
assertEquals("https://example.com/theme.json", configuration.getThemes()[0]);
}

@Test
void setTheme_WithAUrlThatHasATrailingSpace() {
Configuration configuration = new Configuration();
configuration.setTheme("https://example.com/theme.json ");
assertEquals("https://example.com/theme.json", configuration.getTheme());
assertEquals("https://example.com/theme.json", configuration.getThemes()[0]);
}

@Test
Expand All @@ -58,14 +58,14 @@ void setTheme_ThrowsAnIllegalArgumentException_WhenAnInvalidUrlIsSpecified() {
void setTheme_DoesNothing_WhenANullUrlIsSpecified() {
Configuration configuration = new Configuration();
configuration.setTheme(null);
assertNull(configuration.getTheme());
assertEquals(0, configuration.getThemes().length);
}

@Test
void setTheme_DoesNothing_WhenAnEmptyUrlIsSpecified() {
Configuration configuration = new Configuration();
configuration.setTheme(" ");
assertNull(configuration.getTheme());
assertEquals(0, configuration.getThemes().length);
}

}

0 comments on commit e6d97bf

Please sign in to comment.