/** * Creates a target map on a substrate. */ private <N, E extends N> void createTargetOn(ValueContext<N, E> context) { DocumentBasedBasicSet<E, Integer> target = DocumentBasedBasicSet.create(DefaultDocumentEventRouter.create(context.doc), context.container, Serializer.INTEGER, ENTRY_TAG, VALUE_ATTR); // Eventually, the target map and the substrate should be sufficient state for all tests. // However, in order to simulate document events, the two need to be wrapped together in a // FungeStack so that Java knows that the element type-parameters match. stack = new FungeStack<N, E, Integer>(context, target, Serializer.INTEGER); }
/** * Asserts that the test-target's document substrate is in an expected state. * * @param expected list of entries describing the expected state */ private void assertSubstrateEquals(int expected) { stack.assertSubstrateEquals(expected); }
/** * Asserts that the test-target's document substrate is in an expected state. * * @param expected list of entries describing the expected state */ private void assertSubstrateEquals(int expected) { stack.assertSubstrateEquals(expected); }
/** * Creates a target map on a substrate. */ private <N, E extends N> void createTargetOn(ValueContext<N, E> context) { DocumentBasedBasicSet<E, Integer> target = DocumentBasedBasicSet.create(DefaultDocumentEventRouter.create(context.doc), context.container, Serializer.INTEGER, ENTRY_TAG, VALUE_ATTR); // Eventually, the target map and the substrate should be sufficient state for all tests. // However, in order to simulate document events, the two need to be wrapped together in a // FungeStack so that Java knows that the element type-parameters match. stack = new FungeStack<N, E, Integer>(context, target, Serializer.INTEGER); }