X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Ftest%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FProfileTest.java;fp=src%2Ftest%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FProfileTest.java;h=b06e2f46dec50ff4b501470daa7ea53cabba133c;hb=b2e3ba7456f47f01552c8e1300e295c48d8fe9a8;hp=0000000000000000000000000000000000000000;hpb=d60373340ecfadc42638e947c1bb85cad2d4c1b0;p=Sone.git diff --git a/src/test/java/net/pterodactylus/sone/data/ProfileTest.java b/src/test/java/net/pterodactylus/sone/data/ProfileTest.java new file mode 100644 index 0000000..b06e2f4 --- /dev/null +++ b/src/test/java/net/pterodactylus/sone/data/ProfileTest.java @@ -0,0 +1,26 @@ +package net.pterodactylus.sone.data; + +import net.pterodactylus.sone.data.Profile.Field; + +import org.hamcrest.MatcherAssert; +import org.hamcrest.Matchers; +import org.junit.Test; +import org.mockito.Mockito; + +/** + * Unit test for {@link Profile}. + * + * @author David ‘Bombe’ Roden + */ +public class ProfileTest { + + private final Sone sone = Mockito.mock(Sone.class); + private final Profile profile = new Profile(sone); + + @Test + public void newFieldsAreInitializedWithAnEmptyString() { + Field newField = profile.addField("testField"); + MatcherAssert.assertThat(newField.getValue(), Matchers.is("")); + } + +}