blob: a61ee4efc2ddd68d4db80cec9a7219ae7691741d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jdisc.core;
import org.junit.Test;
import java.io.File;
import java.io.FileReader;
import java.util.Properties;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
/**
* @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen Hult</a>
*/
public class ExportPackagesTestCase {
@Test
public void requireThatPropertiesAreWritten() throws Exception {
File file = new File("target", ExportPackages.PROPERTIES_FILE);
file.deleteOnExit();
ExportPackages.main(new String[] { file.getAbsolutePath() });
assertTrue(file.exists());
Properties props = new Properties();
try (FileReader reader = new FileReader(file)) {
props.load(reader);
assertNotNull(props.getProperty(ExportPackages.EXPORT_PACKAGES));
}
}
}
|