Skip to content

Commit

Permalink
remove test case
Browse files Browse the repository at this point in the history
  • Loading branch information
codingPF committed Nov 8, 2023
1 parent 1632404 commit 410c8f2
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions src/test/java/de/mediathekview/mlib/config/ConfigManagerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,28 +56,10 @@ void testGetConfigClass() {

@Test
@Order(3)
void testReadFileConfig() throws IOException {

writeTempTestFileConfig();

final TestConfigDTO fileConfig = new TestConfigManager().getConfig();
assertThat(fileConfig.getValueWithDefault()).isEqualTo("TestValue");
assertThat(fileConfig.getValueWithoutDefault()).isEqualTo("Some other test value");
}

@BeforeEach
void deleteExistingFiles() throws IOException {
Files.deleteIfExists(Paths.get(TEST_CONFIG_FILE_NAME));
}

private void writeTempTestFileConfig() throws IOException {
final Path tempConfigPath = Paths.get("./" + TEST_CONFIG_FILE_NAME);

Files.write(
tempConfigPath,
Arrays.asList("valueWithDefault: TestValue", "valueWithoutDefault: Some other test value"),
StandardOpenOption.CREATE,
StandardOpenOption.TRUNCATE_EXISTING);
void testReadClasspathConfig() {
final TestConfigDTO classpathConfig = new TestConfigManager().getConfig();
assertThat(classpathConfig.getValueWithDefault()).isEqualTo("TestValue");
assertThat(classpathConfig.getValueWithoutDefault()).isEqualTo("Some other test value");
}

}

0 comments on commit 410c8f2

Please sign in to comment.