Browse Source

Added zoom tool test

flabbet 5 years ago
parent
commit
68e1df8dbe
1 changed files with 24 additions and 0 deletions
  1. 24 0
      PixiEditorTests/ModelsTests/ToolsTests/ZoomToolTests.cs

+ 24 - 0
PixiEditorTests/ModelsTests/ToolsTests/ZoomToolTests.cs

@@ -0,0 +1,24 @@
+using PixiEditor.Models.Tools.Tools;
+using PixiEditor.ViewModels;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Xunit;
+
+namespace PixiEditorTests.ModelsTests.ToolsTests
+{
+    [Collection("Application collection")]
+    public class ZoomToolTests
+    {
+        [StaFact]
+        public void TestThatZoomSetsViewModelsZoomPercentage()
+        {
+            ViewModelMain vm = new ViewModelMain();
+            ZoomTool zoomTool = new ZoomTool();
+            double zoom = 110;
+            zoomTool.Zoom(zoom);
+            Assert.Equal(zoom, vm.ZoomPercentage);
+        }
+
+    }
+}