Skip to content

Commit 853a4a9

Browse files
Apply suggestions from code review
Co-authored-by: Marcel Wagner <[email protected]>
1 parent 6057802 commit 853a4a9

File tree

3 files changed

+23
-23
lines changed

3 files changed

+23
-23
lines changed

UnitTests/UnitTests.UWP/UI/Controls/Test_ConstrainedBox.AspectRatio.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ await App.DispatcherQueue.EnqueueAsync(async () =>
5151
Assert.IsNotNull(child, "Could not find inner Border");
5252

5353
// Check Size
54-
Assert.AreEqual(child.ActualWidth, 200, "Width unexpected");
55-
Assert.AreEqual(child.ActualHeight, 100, "Height unexpected");
54+
Assert.AreEqual(200, child.ActualWidth, 1, "Actual width does not meet expected value of 200");
55+
Assert.AreEqual(100, child.ActualHeight, 1, "Actual height does not meet expected value of 100");
5656
});
5757
}
5858

@@ -88,9 +88,9 @@ await App.DispatcherQueue.EnqueueAsync(async () =>
8888
Assert.IsNotNull(child, "Could not find inner Border");
8989

9090
// Check Size
91-
Assert.AreEqual(child.ActualWidth, 100, "Width unexpected");
92-
Assert.AreEqual(child.ActualHeight, 200, "Height unexpected");
91+
Assert.AreEqual(100, child.ActualWidth, 1, "Actual width does not meet expected value of 100");
92+
Assert.AreEqual(200, child.ActualHeight, 1, "Actual height does not meet expected value of 200");
9393
});
9494
}
9595
}
96-
}
96+
}

UnitTests/UnitTests.UWP/UI/Controls/Test_ConstrainedBox.Multiple.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ await App.DispatcherQueue.EnqueueAsync(async () =>
5555
Assert.IsNotNull(child, "Could not find inner Border");
5656

5757
// Check Size
58-
Assert.AreEqual(child.ActualWidth, 192);
59-
Assert.AreEqual(child.ActualHeight, 200);
58+
Assert.AreEqual(192, child.ActualWidth, 1, "Actual width does not meet expected value of 192");
59+
Assert.AreEqual(200, child.ActualHeight, 1, "Actual height does not meet expected value of 200");
6060

6161
// Check inner Positioning, we do this from the Grid as the ConstainedBox also modifies its own size
6262
// and is hugging the child.
6363
var position = grid.CoordinatesTo(child);
6464

65-
Assert.AreEqual(position.X, 4);
66-
Assert.AreEqual(position.Y, 0);
65+
Assert.AreEqual(4, position.X);
66+
Assert.AreEqual(0, position.Y);
6767
});
6868
}
6969

@@ -104,16 +104,16 @@ await App.DispatcherQueue.EnqueueAsync(async () =>
104104
Assert.IsNotNull(child, "Could not find inner Border");
105105

106106
// Check Size
107-
Assert.AreEqual(child.ActualWidth, 200);
108-
Assert.AreEqual(child.ActualHeight, 192);
107+
Assert.AreEqual(200, child.ActualWidth, "Actual width does not meet expected value of 200");
108+
Assert.AreEqual(192, child.ActualHeight, "Actual height does not meet expected value of 192");
109109

110110
// Check inner Positioning, we do this from the Grid as the ConstainedBox also modifies its own size
111111
// and is hugging the child.
112112
var position = grid.CoordinatesTo(child);
113113

114-
Assert.AreEqual(position.X, 0);
115-
Assert.AreEqual(position.Y, 4);
114+
Assert.AreEqual(0, position.X);
115+
Assert.AreEqual(4, position.Y);
116116
});
117117
}
118118
}
119-
}
119+
}

UnitTests/UnitTests.UWP/UI/Controls/Test_ConstrainedBox.Scale.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ await App.DispatcherQueue.EnqueueAsync(async () =>
5555
Assert.IsNotNull(child, "Could not find inner Border");
5656

5757
// Check Size
58-
Assert.AreEqual(child.ActualWidth, 100);
59-
Assert.AreEqual(child.ActualHeight, 200);
58+
Assert.AreEqual(100, child.ActualWidth, 1, "Actual width does not meet expected value of 100");
59+
Assert.AreEqual(200, child.ActualHeight, 1, "Actual height does not meet expected value of 200");
6060

6161
// Check inner Positioning, we do this from the Grid as the ConstainedBox also modifies its own size
6262
// and is hugging the child.
6363
var position = grid.CoordinatesTo(child);
6464

65-
Assert.AreEqual(position.X, 50);
66-
Assert.AreEqual(position.Y, 0);
65+
Assert.AreEqual(50, position.X);
66+
Assert.AreEqual(0, position.Y);
6767
});
6868
}
6969

@@ -104,16 +104,16 @@ await App.DispatcherQueue.EnqueueAsync(async () =>
104104
Assert.IsNotNull(child, "Could not find inner Border");
105105

106106
// Check Size
107-
Assert.AreEqual(child.ActualWidth, 200);
108-
Assert.AreEqual(child.ActualHeight, 100);
107+
Assert.AreEqual(200, child.ActualWidth, 1, "Actual width does not meet expected value of 200");
108+
Assert.AreEqual(100, child.ActualHeight, 1, "Actual height does not meet expected value of 100");
109109

110110
// Check inner Positioning, we do this from the Grid as the ConstainedBox also modifies its own size
111111
// and is hugging the child.
112112
var position = grid.CoordinatesTo(child);
113113

114-
Assert.AreEqual(position.X, 0);
115-
Assert.AreEqual(position.Y, 50);
114+
Assert.AreEqual(0, position.X);
115+
Assert.AreEqual(50, position.Y);
116116
});
117117
}
118118
}
119-
}
119+
}

0 commit comments

Comments
 (0)