1 package net.pterodactylus.rhynodge.engine;
3 import java.io.IOException;
4 import java.io.InputStream;
6 import org.hamcrest.MatcherAssert;
7 import org.hamcrest.Matchers;
11 * Unit test for {@link Configuration}.
13 * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
15 public class ConfigurationTest {
18 public void configurationCanBeReadFromJsonFile() throws IOException {
19 InputStream inputStream = getClass().getResourceAsStream("configuration.json");
20 Configuration configuration = Configuration.from(inputStream);
21 MatcherAssert.assertThat(configuration.getSmtpHostname(), Matchers.is("localhost"));
22 MatcherAssert.assertThat(configuration.getErrorEmailSender(), Matchers.is("errors@rhynodge.net"));
23 MatcherAssert.assertThat(configuration.getErrorEmailRecipient(), Matchers.is("errors@user.net"));