mirror of
https://github.com/plexusorg/toml4j.git
synced 2025-02-11 11:40:27 +00:00
Rename TomlParseTest to TomlReadTest
This commit is contained in:
parent
40f866f5cd
commit
e27ba3e8fb
1 changed files with 3 additions and 3 deletions
|
@ -13,17 +13,17 @@ import java.io.StringReader;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
public class TomlParseTest {
|
public class TomlReadTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void should_parse_input_stream() throws Exception {
|
public void should_read_input_stream() throws Exception {
|
||||||
Toml toml = new Toml().read(getClass().getResourceAsStream("should_load_from_file.toml"));
|
Toml toml = new Toml().read(getClass().getResourceAsStream("should_load_from_file.toml"));
|
||||||
|
|
||||||
assertEquals("value", toml.getString("key"));
|
assertEquals("value", toml.getString("key"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void should_parse_reader() throws Exception {
|
public void should_read_reader() throws Exception {
|
||||||
Toml toml = new Toml().read(new StringReader("key=1"));
|
Toml toml = new Toml().read(new StringReader("key=1"));
|
||||||
|
|
||||||
assertEquals(1, toml.getLong("key").intValue());
|
assertEquals(1, toml.getLong("key").intValue());
|
Loading…
Reference in a new issue