Skip to content

Commit f9bd036

Browse files
author
Nicolai Parlog
committed
Minor changes to tests.
1 parent a950d90 commit f9bd036

File tree

2 files changed

+30
-4
lines changed

2 files changed

+30
-4
lines changed

test/org/codefx/libfx/nesting/property/AbstractNestedPropertyTest.java

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import static org.codefx.libfx.nesting.testhelper.NestingAccess.setNestingValue;
77
import static org.junit.Assert.assertEquals;
88
import static org.junit.Assert.assertFalse;
9+
import static org.junit.Assert.assertNotEquals;
910
import static org.junit.Assert.assertNotSame;
1011
import static org.junit.Assert.assertNull;
1112
import static org.junit.Assert.assertTrue;
@@ -167,9 +168,9 @@ public void testChangingOldObservablesValue() {
167168
T newValueInOldObservable = createNewValue();
168169
oldObservable.setValue(newValueInOldObservable);
169170

170-
// assert that nesting and property do not hold the old observable's value ...
171-
assertNotSame(newValueInOldObservable, property.getValue());
172-
// ... but the new one
171+
// assert that nesting and property do not hold the old observable's new value ...
172+
assertNotEquals(newValueInOldObservable, property.getValue());
173+
// ... but the new observable's value
173174
assertEquals(getNestingValue(nesting), property.getValue());
174175
assertEquals(newValueInNewObservable, property.getValue());
175176
}
@@ -220,4 +221,29 @@ public void testChangingOldObservablesValue() {
220221

221222
//#end ABSTRACT METHODS
222223

224+
// #region ATTRIBUTE ACCESS
225+
226+
/**
227+
* @return the nesting on which the tested property is based
228+
*/
229+
public NestingAccess.EditableNesting<P> getNesting() {
230+
return nesting;
231+
}
232+
233+
/**
234+
* @return the tested property
235+
*/
236+
public NestedProperty<T> getProperty() {
237+
return property;
238+
}
239+
240+
/**
241+
* @return the {@link #getProperty tested property}'s current value
242+
*/
243+
public T getPropertyValue() {
244+
return property.getValue();
245+
}
246+
247+
//#end ATTRIBUTE ACCESS
248+
223249
}

test/org/codefx/libfx/nesting/property/AbstractNestedStringPropertyTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public abstract class AbstractNestedStringPropertyTest extends AbstractNestedPro
1818

1919
@Override
2020
protected boolean allowsNullValues() {
21-
return false;
21+
return true;
2222
}
2323

2424
@Override

0 commit comments

Comments
 (0)