Skip to content

Commit

Permalink
test: fix tests assertions (#719)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dor-bl authored Dec 31, 2023
1 parent c7eba94 commit 65d2fb3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions test/integration/Windows/ImagesComparisonTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public void BeforeAll()
public void OneTimeTearDown()
{
CalculatorResult = null;
_calculatorSession.CloseApp();
_calculatorSession.Dispose();
_calculatorSession?.CloseApp();
_calculatorSession?.Dispose();
_calculatorSession = null;
}

Expand Down Expand Up @@ -61,7 +61,8 @@ public void OccurencesLookup()

Assert.Multiple(() =>
{
Assert.That(occurencesResult.Rect, Is.Not.Empty);
Assert.That(occurencesResult.Rect.IsEmpty, Is.False);
Assert.That(occurencesResult.Rect.Bottom, Is.GreaterThan(0));
Assert.That(occurencesResult.Visualization, Is.Not.Null);
});
}
Expand All @@ -70,7 +71,8 @@ public void OccurencesLookup()
public void FeaturesMatching()
{
var screenshot = _calculatorSession.GetScreenshot();
var options = new FeaturesMatchingOptions {
var options = new FeaturesMatchingOptions
{
Visualize = true,
DetectorName = "ORB",
MatchFunc = "BruteForce",
Expand All @@ -88,8 +90,8 @@ public void FeaturesMatching()
});
Assert.Multiple(() =>
{
Assert.That(occurencesResult.Rect1.Width, Is.Not.Empty);
Assert.That(occurencesResult.Rect2.Height, Is.Not.Empty);
Assert.That(occurencesResult.Rect1.Width, Is.Positive);
Assert.That(occurencesResult.Rect2.Height, Is.Positive);
});
}
}
Expand Down

0 comments on commit 65d2fb3

Please sign in to comment.