Esempio n. 1
0
        public void TestThatGeneratePreviewLayerGeneratesPreviewLayer()
        {
            BitmapManager bitmapManager = new BitmapManager
            {
                ActiveDocument = new Document(10, 10)
            };

            bitmapManager.GeneratePreviewLayer();
            Assert.NotNull(bitmapManager.PreviewLayer);
            Assert.Equal(0, bitmapManager.PreviewLayer.Width + bitmapManager.PreviewLayer.Height);    //Size is zero
            Assert.Equal(0, bitmapManager.PreviewLayer.OffsetX + bitmapManager.PreviewLayer.OffsetY); //Offset is zero
            Assert.Equal(bitmapManager.ActiveDocument.Width, bitmapManager.PreviewLayer.MaxWidth);
            Assert.Equal(bitmapManager.ActiveDocument.Height, bitmapManager.PreviewLayer.MaxHeight);
        }