Add method to set the value of a field.
[Sone.git] / src / test / java / net / pterodactylus / sone / data / ProfileTest.java
index eab4062..0fcb80e 100644 (file)
@@ -51,4 +51,13 @@ public class ProfileTest {
                assertThat(testField.getId(), is(renamedField.getId()));
        }
 
+       @Test
+       public void testChangingTheValueOfAField() {
+               profile.addField("TestField");
+               Field testField = profile.getFieldByName("TestField");
+               profile.setField(testField, "Test");
+               testField = profile.getFieldByName("TestField");
+               assertThat(testField.getValue(), is("Test"));
+       }
+
 }