|
@@ -53,6 +53,38 @@ public class SliderOptionTests {
|
|
|
// Assert
|
|
|
Assert.True (eventRaised);
|
|
|
}
|
|
|
+
|
|
|
+ [Fact]
|
|
|
+ public void SliderOption_ToString_WhenEmpty ()
|
|
|
+ {
|
|
|
+ var sliderOption = new SliderOption<object> ();
|
|
|
+ Assert.Equal ("{Legend=, LegendAbbr=\0, Data=}", sliderOption.ToString ());
|
|
|
+ }
|
|
|
+
|
|
|
+ [Fact]
|
|
|
+ public void SliderOption_ToString_WhenPopulated_WithInt ()
|
|
|
+ {
|
|
|
+ var sliderOption = new SliderOption<int> {
|
|
|
+ Legend = "Lord flibble",
|
|
|
+ LegendAbbr = new Rune ('l'),
|
|
|
+ Data = 1,
|
|
|
+ };
|
|
|
+
|
|
|
+ Assert.Equal ("{Legend=Lord flibble, LegendAbbr=l, Data=1}", sliderOption.ToString ());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ [Fact]
|
|
|
+ public void SliderOption_ToString_WhenPopulated_WithSizeF ()
|
|
|
+ {
|
|
|
+ var sliderOption = new SliderOption<SizeF> {
|
|
|
+ Legend = "Lord flibble",
|
|
|
+ LegendAbbr = new Rune ('l'),
|
|
|
+ Data = new SizeF(32,11),
|
|
|
+ };
|
|
|
+
|
|
|
+ Assert.Equal ("{Legend=Lord flibble, LegendAbbr=l, Data={Width=32, Height=11}}", sliderOption.ToString ());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public class SliderEventArgsTests {
|
|
@@ -411,7 +443,7 @@ public class SliderTests {
|
|
|
|
|
|
// Assert
|
|
|
Assert.False (result);
|
|
|
- Assert.NotEmpty (slider.GetSetOptions());
|
|
|
+ Assert.NotEmpty (slider.GetSetOptions ());
|
|
|
}
|
|
|
|
|
|
// Add more tests for different scenarios and edge cases.
|