Move const usage out of Shared
This commit is contained in:
@ -85,8 +85,8 @@ public class UnitTestResize
|
||||
width = 100;
|
||||
height = 100;
|
||||
Location location = new(bottom, confidence, left, null, right, top);
|
||||
_ = new Location(confidence, height, location, width, 1);
|
||||
_ = new Location(bottom, confidence, height, left, right, top, width, 1);
|
||||
_ = new Location(confidence, height, location, Shared.Models.Stateless.ILocation.Digits, Shared.Models.Stateless.ILocation.Factor, width, 1);
|
||||
_ = new Location(bottom, confidence, height, left, Shared.Models.Stateless.ILocation.Digits, Shared.Models.Stateless.ILocation.Factor, right, top, width, 1);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
@ -100,7 +100,7 @@ public class UnitTestResize
|
||||
bottom = 10;
|
||||
width = 100;
|
||||
height = 100;
|
||||
normalizedPixelPercentage = Shared.Models.Stateless.Methods.ILocation.GetNormalizedPixelPercentage(bottom, height, left, right, top, width, 1);
|
||||
normalizedPixelPercentage = Shared.Models.Stateless.Methods.ILocation.GetNormalizedPixelPercentage(bottom, height, left, Shared.Models.Stateless.ILocation.Digits, Shared.Models.Stateless.ILocation.Factor, right, top, width, 1);
|
||||
Assert.IsTrue(normalizedPixelPercentage == 40500);
|
||||
left = 50;
|
||||
top = 50;
|
||||
@ -108,7 +108,7 @@ public class UnitTestResize
|
||||
bottom = 60;
|
||||
width = 100;
|
||||
height = 100;
|
||||
normalizedPixelPercentage = Shared.Models.Stateless.Methods.ILocation.GetNormalizedPixelPercentage(bottom, height, left, right, top, width, 1);
|
||||
normalizedPixelPercentage = Shared.Models.Stateless.Methods.ILocation.GetNormalizedPixelPercentage(bottom, height, left, Shared.Models.Stateless.ILocation.Digits, Shared.Models.Stateless.ILocation.Factor, right, top, width, 1);
|
||||
Assert.IsTrue(normalizedPixelPercentage == 545500);
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ public class UnitTestResize
|
||||
bottom = 260;
|
||||
width = 500;
|
||||
height = 500;
|
||||
normalizedPixelPercentage = Shared.Models.Stateless.Methods.ILocation.GetNormalizedPixelPercentage(bottom, height, left, right, top, width, 1);
|
||||
normalizedPixelPercentage = Shared.Models.Stateless.Methods.ILocation.GetNormalizedPixelPercentage(bottom, height, left, Shared.Models.Stateless.ILocation.Digits, Shared.Models.Stateless.ILocation.Factor, right, top, width, 1);
|
||||
Assert.IsTrue(normalizedPixelPercentage == 499000);
|
||||
left = 490;
|
||||
top = 490;
|
||||
@ -131,7 +131,7 @@ public class UnitTestResize
|
||||
bottom = 510;
|
||||
width = 1000;
|
||||
height = 1000;
|
||||
normalizedPixelPercentage = Shared.Models.Stateless.Methods.ILocation.GetNormalizedPixelPercentage(bottom, height, left, right, top, width, 1);
|
||||
normalizedPixelPercentage = Shared.Models.Stateless.Methods.ILocation.GetNormalizedPixelPercentage(bottom, height, left, Shared.Models.Stateless.ILocation.Digits, Shared.Models.Stateless.ILocation.Factor, right, top, width, 1);
|
||||
Assert.IsTrue(normalizedPixelPercentage == 499500);
|
||||
}
|
||||
|
||||
@ -146,7 +146,7 @@ public class UnitTestResize
|
||||
bottom = 80;
|
||||
width = 100;
|
||||
height = 100;
|
||||
normalizedPixelPercentage = Shared.Models.Stateless.Methods.ILocation.GetNormalizedPixelPercentage(bottom, height, left, right, top, width, 1);
|
||||
normalizedPixelPercentage = Shared.Models.Stateless.Methods.ILocation.GetNormalizedPixelPercentage(bottom, height, left, Shared.Models.Stateless.ILocation.Digits, Shared.Models.Stateless.ILocation.Factor, right, top, width, 1);
|
||||
Assert.IsTrue(normalizedPixelPercentage == 594000);
|
||||
left = 20;
|
||||
top = 40;
|
||||
@ -154,7 +154,7 @@ public class UnitTestResize
|
||||
bottom = 80;
|
||||
width = 100;
|
||||
height = 100;
|
||||
normalizedPixelPercentage = Shared.Models.Stateless.Methods.ILocation.GetNormalizedPixelPercentage(bottom, height, left, right, top, width, 10);
|
||||
normalizedPixelPercentage = Shared.Models.Stateless.Methods.ILocation.GetNormalizedPixelPercentage(bottom, height, left, Shared.Models.Stateless.ILocation.Digits, Shared.Models.Stateless.ILocation.Factor, right, top, width, 10);
|
||||
Assert.IsTrue(normalizedPixelPercentage == 594000);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user