Skip to content

Commit ecbfe88

Browse files
author
Jérémy JANISZEWSKI
committed
Correct unit test
1 parent 3c85353 commit ecbfe88

2 files changed

Lines changed: 20 additions & 4 deletions

File tree

examples/demo/FluentUI.Demo.Shared/FluentUI.Blazor.Community.Components.xml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13448,6 +13448,11 @@
1344813448
Represents a value indicating if the show indicator has changed.
1344913449
</summary>
1345013450
</member>
13451+
<member name="F:FluentUI.Blazor.Community.Components.FluentCxSlideshow`1._isSizeChanged">
13452+
<summary>
13453+
Represents a value indicating if the size has changed.
13454+
</summary>
13455+
</member>
1345113456
<member name="P:FluentUI.Blazor.Community.Components.FluentCxSlideshow`1.ShowControls">
1345213457
<summary>
1345313458
Gets or sets a value indicating that the controls are shown.
@@ -13823,9 +13828,6 @@
1382313828
<member name="M:FluentUI.Blazor.Community.Components.FluentCxSlideshow`1.OnAfterRenderAsync(System.Boolean)">
1382413829
<inheritdoc />
1382513830
</member>
13826-
<member name="M:FluentUI.Blazor.Community.Components.FluentCxSlideshow`1.Dispose">
13827-
<inheritdoc />
13828-
</member>
1382913831
<member name="M:FluentUI.Blazor.Community.Components.FluentCxSlideshow`1.DisposeAsync">
1383013832
<inheritdoc />
1383113833
</member>
@@ -13846,6 +13848,11 @@
1384613848
Occurs when all images have been resized.
1384713849
</summary>
1384813850
</member>
13851+
<member name="M:FluentUI.Blazor.Community.Components.FluentCxSlideshow`1.OnContainerSizeCompletedAsync">
13852+
<summary>
13853+
Occurs when all images have been resized.
13854+
</summary>
13855+
</member>
1384913856
<member name="M:FluentUI.Blazor.Community.Components.FluentCxSlideshow`1.OnFillSizeCompletedAsync(System.Int32,System.Int32)">
1385013857
<summary>
1385113858
Occurs when all images have been resized to fill the container.
@@ -14035,6 +14042,11 @@
1403514042
after that, the first image in the slideshow, when stretched, gives the height of the container,
1403614043
and the other images will take that height.</remarks>
1403714044
</member>
14045+
<member name="F:FluentUI.Blazor.Community.Components.SlideshowImageRatio.Container">
14046+
<summary>
14047+
The image covers the entire container, without keeping the aspect ratio.
14048+
</summary>
14049+
</member>
1403814050
<member name="T:FluentUI.Blazor.Community.Components.SlideshowIndicatorPosition">
1403914051
<summary>
1404014052
Gets or sets the position of the indicator.

tests/FluentUI.Blazor.Community.Components.Tests/Components/Slideshow/SlideshowImageRatioTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ public void Enum_Should_Have_Auto_And_Fill_Members()
77
{
88
Assert.Equal(0, (int)SlideshowImageRatio.Auto);
99
Assert.Equal(1, (int)SlideshowImageRatio.Fill);
10+
Assert.Equal(2, (int)SlideshowImageRatio.Container);
1011
}
1112

1213
[Theory]
1314
[InlineData(SlideshowImageRatio.Auto, "Auto")]
1415
[InlineData(SlideshowImageRatio.Fill, "Fill")]
16+
[InlineData(SlideshowImageRatio.Container, "Container")]
1517
public void ToString_Should_Return_Correct_Name(SlideshowImageRatio ratio, string expected)
1618
{
1719
Assert.Equal(expected, ratio.ToString());
@@ -20,6 +22,7 @@ public void ToString_Should_Return_Correct_Name(SlideshowImageRatio ratio, strin
2022
[Theory]
2123
[InlineData("Auto", SlideshowImageRatio.Auto)]
2224
[InlineData("Fill", SlideshowImageRatio.Fill)]
25+
[InlineData("Container", SlideshowImageRatio.Container)]
2326
public void Parse_Should_Return_Correct_Enum(string value, SlideshowImageRatio expected)
2427
{
2528
var result = Enum.Parse<SlideshowImageRatio>(value);
@@ -32,6 +35,7 @@ public void GetValues_Should_Contain_All_Members()
3235
var values = System.Enum.GetValues<SlideshowImageRatio>();
3336
Assert.Contains(SlideshowImageRatio.Auto, values);
3437
Assert.Contains(SlideshowImageRatio.Fill, values);
35-
Assert.Equal(2, values.Length);
38+
Assert.Contains(SlideshowImageRatio.Container, values);
39+
Assert.Equal(3, values.Length);
3640
}
3741
}

0 commit comments

Comments
 (0)