/** * {@inheritDoc} */ public void process(EntityContainer entityContainer) { initialize(); osmWriter.process(entityContainer); }
/** * {@inheritDoc} */ public void process(EntityContainer entityContainer) { initialize(); osmWriter.process(entityContainer); }
/** * Writes the change in the container. * * @param changeContainer * The container holding the change. */ public void process(final ChangeContainer changeContainer) { updateActiveOsmWriter(changeContainer.getAction()); activeOsmWriter.process(changeContainer.getEntityContainer()); } }
/** * Writes the change in the container. * * @param changeContainer * The container holding the change. */ public void process(final ChangeContainer changeContainer) { updateActiveOsmWriter(changeContainer.getAction()); activeOsmWriter.process(changeContainer.getEntityContainer()); } }
/** * Test processing a Node entity. */ @Test public final void testProcess3() { testOsmWriter.process( new NodeContainer( new Node( new CommonEntityData( 1234, 0, new Date(), new OsmUser(12, "OsmosisTest"), 0, new ArrayList<Tag>()), 20, 20))); // Nothing to assert; just expect no exception }
/** * Test processing a Bound after a Node. */ @Test(expected = OsmosisRuntimeException.class) public final void testProcess4() { testOsmWriter.process(new NodeContainer( new Node( new CommonEntityData(1234, 0, new Date(), new OsmUser(12, "OsmosisTest"), 0, new ArrayList<Tag>()), 20, 20))); testOsmWriter.process(new BoundContainer(new Bound("source"))); fail("Expected to throw an exception."); }
/** * Test processing a single Bound entity. */ @Test public final void testProcess1() { testOsmWriter.process(new BoundContainer(new Bound("source"))); // Nothing to assert; just expect no exception }
/** * Test processing a Relation. */ @Test public final void testProcess8() { Relation testRelation; testRelation = new Relation(new CommonEntityData(3456, 0, new Date(), new OsmUser(12, "OsmosisTest"), 0)); testRelation.getMembers().add(new RelationMember(1234, EntityType.Node, "role1")); testRelation.getTags().add(new Tag("test_key1", "test_value1")); testOsmWriter.process(new RelationContainer(testRelation)); // Nothing to assert; just expect no exception }
/** * Test processing a repeated Bound entity. */ @Test(expected = OsmosisRuntimeException.class) public final void testProcess2() { testOsmWriter.process(new BoundContainer(new Bound("source"))); testOsmWriter.process(new BoundContainer(new Bound("source2"))); fail("Expected to throw an exception."); }
/** * Test processing a Bound after a Relation. */ @Test(expected = OsmosisRuntimeException.class) public final void testProcess9() { Relation testRelation; testRelation = new Relation(new CommonEntityData(3456, 0, new Date(), new OsmUser(12, "OsmosisTest"), 0)); testRelation.getMembers().add(new RelationMember(1234, EntityType.Node, "role1")); testRelation.getTags().add(new Tag("test_key1", "test_value1")); testOsmWriter.process(new RelationContainer(testRelation)); testOsmWriter.process(new BoundContainer(new Bound("source"))); } }
/** * Test processing a Bound after a Way. */ @Test(expected = OsmosisRuntimeException.class) public final void testProcess7() { Way testWay; testWay = new Way(new CommonEntityData(3456, 0, new Date(), new OsmUser(12, "OsmosisTest"), 0)); testWay.getWayNodes().add(new WayNode(1234)); testWay.getWayNodes().add(new WayNode(1235)); testWay.getTags().add(new Tag("test_key1", "test_value1")); testOsmWriter.process(new WayContainer(testWay)); testOsmWriter.process(new BoundContainer(new Bound("source"))); }
/** * Test processing a Way. */ @Test public final void testProcess6() { Way testWay; testWay = new Way(new CommonEntityData(3456, 0, new Date(), new OsmUser(12, "OsmosisTest"), 0)); testWay.getWayNodes().add(new WayNode(1234)); testWay.getWayNodes().add(new WayNode(1235)); testWay.getTags().add(new Tag("test_key1", "test_value1")); testOsmWriter.process(new WayContainer(testWay)); // Nothing to assert; just expect no exception }