Skip to content

Commit

Permalink
#19 - Delinting
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeclayton committed Jul 14, 2023
1 parent fecead5 commit 7b3d3f5
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 25 deletions.
7 changes: 3 additions & 4 deletions src/FancyMouse.UnitTests/Helpers/DrawingHelperTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Drawing;
using System.Drawing.Imaging;
using System.Security.Cryptography.X509Certificates;
using FancyMouse.Helpers;
using FancyMouse.Models.Drawing;
using FancyMouse.Models.Settings;
Expand Down Expand Up @@ -57,11 +56,11 @@ public TestCase(PreviewStyle previewStyle, List<(RectangleInfo Bounds, Color Col
this.ActivatedLocation = activatedLocation;
}

public PreviewStyle PreviewStyle { get; set; }
public PreviewStyle PreviewStyle { get; }

public List<(RectangleInfo Bounds, Color Color)> Screens { get; set; }
public List<(RectangleInfo Bounds, Color Color)> Screens { get; }

public PointInfo ActivatedLocation { get; set; }
public PointInfo ActivatedLocation { get; }
}

public static IEnumerable<object[]> GetTestCases()
Expand Down
5 changes: 2 additions & 3 deletions src/FancyMouse.UnitTests/Helpers/LayoutHelperTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using FancyMouse.Models.Layout;
using FancyMouse.Models.Styles;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using static FancyMouse.NativeMethods.Core;

namespace FancyMouse.UnitTests.Helpers;

Expand All @@ -24,9 +23,9 @@ public TestCase(LayoutConfig layoutConfig, LayoutInfo expectedResult)
this.ExpectedResult = expectedResult;
}
public LayoutConfig LayoutConfig { get; set; }
public LayoutConfig LayoutConfig { get; }
public LayoutInfo ExpectedResult { get; set; }
public LayoutInfo ExpectedResult { get; }
}
public static IEnumerable<object[]> GetTestCases()
Expand Down
8 changes: 4 additions & 4 deletions src/FancyMouse.UnitTests/Helpers/MouseHelperTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ public TestCase(PointInfo previewLocation, SizeInfo previewSize, RectangleInfo
this.ExpectedResult = expectedResult;
}

public PointInfo PreviewLocation { get; set; }
public PointInfo PreviewLocation { get; }

public SizeInfo PreviewSize { get; set; }
public SizeInfo PreviewSize { get; }

public RectangleInfo DesktopBounds { get; set; }
public RectangleInfo DesktopBounds { get; }

public PointInfo ExpectedResult { get; set; }
public PointInfo ExpectedResult { get; }
}

public static IEnumerable<object[]> GetTestCases()
Expand Down
12 changes: 6 additions & 6 deletions src/FancyMouse.UnitTests/Models/Drawing/RectangleInfoTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ public TestCase(RectangleInfo rectangle, PointInfo point, RectangleInfo expected
this.ExpectedResult = expectedResult;
}

public RectangleInfo Rectangle { get; set; }
public RectangleInfo Rectangle { get; }

public PointInfo Point { get; set; }
public PointInfo Point { get; }

public RectangleInfo ExpectedResult { get; set; }
public RectangleInfo ExpectedResult { get; }
}

public static IEnumerable<object[]> GetTestCases()
Expand Down Expand Up @@ -69,11 +69,11 @@ public TestCase(RectangleInfo inner, RectangleInfo outer, RectangleInfo expected
this.ExpectedResult = expectedResult;
}

public RectangleInfo Inner { get; set; }
public RectangleInfo Inner { get; }

public RectangleInfo Outer { get; set; }
public RectangleInfo Outer { get; }

public RectangleInfo ExpectedResult { get; set; }
public RectangleInfo ExpectedResult { get; }
}

public static IEnumerable<object[]> GetTestCases()
Expand Down
12 changes: 6 additions & 6 deletions src/FancyMouse.UnitTests/Models/Drawing/SizeInfoTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ public TestCase(SizeInfo obj, SizeInfo bounds, SizeInfo expectedResult)
this.ExpectedResult = expectedResult;
}

public SizeInfo Obj { get; set; }
public SizeInfo Obj { get; }

public SizeInfo Bounds { get; set; }
public SizeInfo Bounds { get; }

public SizeInfo ExpectedResult { get; set; }
public SizeInfo ExpectedResult { get; }
}

public static IEnumerable<object[]> GetTestCases()
Expand Down Expand Up @@ -65,11 +65,11 @@ public TestCase(SizeInfo obj, SizeInfo bounds, decimal expectedResult)
this.ExpectedResult = expectedResult;
}

public SizeInfo Obj { get; set; }
public SizeInfo Obj { get; }

public SizeInfo Bounds { get; set; }
public SizeInfo Bounds { get; }

public decimal ExpectedResult { get; set; }
public decimal ExpectedResult { get; }
}

public static IEnumerable<object[]> GetTestCases()
Expand Down
2 changes: 1 addition & 1 deletion src/FancyMouse.WindowsHotKeys/Keystroke.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static Keystroke Parse(string s)
{
if (!Keystroke.TryParse(s, out var result))
{
throw new ArgumentException($"Invalid argument format.", nameof(s));
throw new ArgumentException("Invalid argument format.", nameof(s));
}

return result;
Expand Down
1 change: 0 additions & 1 deletion src/FancyMouse/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Text.Json.Nodes;
using FancyMouse.Models.Settings;
using FancyMouse.UI;
using FancyMouse.WindowsHotKeys;
Expand Down

0 comments on commit 7b3d3f5

Please sign in to comment.