Beispiel #1
0
        public void TestThatZoomSetsViewModelsZoomPercentage()
        {
            ViewModelMain vm       = new ViewModelMain();
            ZoomTool      zoomTool = new ZoomTool();
            double        zoom     = 110;

            zoomTool.Zoom(zoom);
            Assert.Equal(zoom, vm.ZoomPercentage);
        }
Beispiel #2
0
        public void TestThatZoomSetsActiveDocumentZoomPercentage()
        {
            ViewModelMain vm = new ViewModelMain();

            vm.BitmapManager.ActiveDocument = new PixiEditor.Models.DataHolders.Document(10, 10);
            ZoomTool zoomTool = new ZoomTool();
            double   zoom     = 110;

            zoomTool.Zoom(zoom);
            Assert.Equal(zoom, vm.BitmapManager.ActiveDocument.ZoomPercentage);
        }
Beispiel #3
0
        public void TestThatZoomSetsActiveDocumentZoomPercentage()
        {
            ViewModelMain vm = new ViewModelMain(new ServiceCollection().AddSingleton <IPreferences>(new Mocks.PreferenceSettingsMock()).BuildServiceProvider());

            vm.BitmapManager.ActiveDocument = new PixiEditor.Models.DataHolders.Document(10, 10);
            ZoomTool zoomTool = new ZoomTool();
            double   zoom     = 110;

            zoomTool.Zoom(zoom);
            Assert.Equal(zoom, vm.BitmapManager.ActiveDocument.ZoomPercentage);
        }