Пример #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void visibleTest()
        public virtual void visibleTest()
        {
            Layer layer = new DummyLayer();

            Assert.assertTrue(layer.Visible);

            layer.Visible = false;
            Assert.assertFalse(layer.Visible);
        }
Пример #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void callbackTest()
        public virtual void callbackTest()
        {
            Layers layers = new Layers(new DummyRedrawer(), new DisplayModel());

            DummyLayer dummyLayer = new DummyLayer();

            checkCallbacks(dummyLayer, 0, 0);

            layers.add(dummyLayer);
            checkCallbacks(dummyLayer, 1, 0);

            layers.remove(dummyLayer);
            checkCallbacks(dummyLayer, 1, 1);

            layers.add(0, dummyLayer);
            checkCallbacks(dummyLayer, 2, 1);

            layers.clear();
            checkCallbacks(dummyLayer, 2, 2);
        }
Пример #3
0
 private static void checkCallbacks(DummyLayer dummyLayer, int expectedAddCalls, int expectedRemoveCalls)
 {
     Assert.assertEquals(expectedAddCalls, dummyLayer.onAddCalls);
     Assert.assertEquals(expectedRemoveCalls, dummyLayer.onRemoveCalls);
 }