Exemple #1
0
        public void ConstructorWithBundleTest()
        {
            try
            {
                var nullBundleLayer = new Layer(null);
                Assert.Fail("Layer initiated with null bundle");
            }
            catch (ArgumentNullException e)
            {
                Assert.AreEqual(e.ParamName, "layerBundle");
            }

            var layerBundle = new LayerBundle()
            {
                Bitmap    = new Bitmap(1, 1),
                IsVisible = true,
                Position  = new Point(),
                Size      = new Size(1, 1)
            };

            var layer = new Layer(layerBundle);

            Assert.AreEqual(layerBundle.Bitmap, layer.Bitmap);
            Assert.AreEqual(layerBundle.Size, layer.Size);
            Assert.AreEqual(layerBundle.Position, layer.Position);
            Assert.AreEqual(layerBundle.Size, layer.Size);
        }
Exemple #2
0
 public void ConstructorTest()
 {
     var layerBundle = new LayerBundle()
     {
         Bitmap    = new Bitmap(1, 1),
         IsVisible = true,
         Position  = new Point(),
         Size      = new Size(1, 1)
     };
 }