@Test public void testReloadPoints() { setValuesSafe(0, 10, 2); GeoElementFactory factory = getElementFactory(); GeoFunction fn = factory.createFunction("f:x^2"); fn.setPointsVisible(false); showColumn(fn); Assert.assertEquals(false, fn.isPointsVisible()); String xml = getApp().getXML(); getKernel().clearConstruction(true); getApp().setXML(xml, true); GeoFunction fnReload = lookupFunction("f"); Assert.assertEquals(false, fnReload.isPointsVisible()); }
kernel.clearConstruction(false);
@Test public void testReloadOrder() { setValuesSafe(0, 10, 2); GeoElementFactory factory = getElementFactory(); GeoFunction fn = factory.createFunction("f:x^2"); GeoFunction fn2 = factory.createFunction("f2:x^2"); showColumn(fn2); showColumn(fn); Assert.assertEquals(2, view.getColumn(fn)); String xml = getApp().getXML(); getKernel().clearConstruction(true); Assert.assertEquals(-1, view.getColumn(fn)); getApp().setXML(xml, true); GeoFunction fnReload = lookupFunction("f"); Assert.assertEquals(2, view.getColumn(fnReload)); }
@Test public void testReload() { setValuesSafe(0, 10, 2); GeoElementFactory factory = getElementFactory(); GeoFunction fn = factory.createFunction("f:x^2"); showColumn(fn); Assert.assertEquals(1, view.getColumn(fn)); String xml = getApp().getXML(); setValuesSafe(10, 20, 2); getKernel().clearConstruction(true); Assert.assertEquals(-1, view.getColumn(fn)); Assert.assertEquals(2, view.getValuesMax(), .1); getApp().setXML(xml, true); GeoFunction fnReload = lookupFunction("f"); Assert.assertEquals(10, view.getValuesMax(), .1); Assert.assertEquals(1, view.getColumn(fnReload)); }