|
6 | 6 | import static org.codefx.libfx.nesting.testhelper.NestingAccess.setNestingValue;
|
7 | 7 | import static org.junit.Assert.assertEquals;
|
8 | 8 | import static org.junit.Assert.assertFalse;
|
| 9 | +import static org.junit.Assert.assertNotEquals; |
9 | 10 | import static org.junit.Assert.assertNotSame;
|
10 | 11 | import static org.junit.Assert.assertNull;
|
11 | 12 | import static org.junit.Assert.assertTrue;
|
@@ -167,9 +168,9 @@ public void testChangingOldObservablesValue() {
|
167 | 168 | T newValueInOldObservable = createNewValue();
|
168 | 169 | oldObservable.setValue(newValueInOldObservable);
|
169 | 170 |
|
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 |
173 | 174 | assertEquals(getNestingValue(nesting), property.getValue());
|
174 | 175 | assertEquals(newValueInNewObservable, property.getValue());
|
175 | 176 | }
|
@@ -220,4 +221,29 @@ public void testChangingOldObservablesValue() {
|
220 | 221 |
|
221 | 222 | //#end ABSTRACT METHODS
|
222 | 223 |
|
| 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 | + |
223 | 249 | }
|
0 commit comments