diff --git a/CodeBeam.MudBlazor.Extensions.UnitTests/Components/ComboboxTests.cs b/CodeBeam.MudBlazor.Extensions.UnitTests/Components/ComboboxTests.cs index cff67b7c..35221cdc 100644 --- a/CodeBeam.MudBlazor.Extensions.UnitTests/Components/ComboboxTests.cs +++ b/CodeBeam.MudBlazor.Extensions.UnitTests/Components/ComboboxTests.cs @@ -14,7 +14,7 @@ namespace MudExtensions.UnitTests.Components { [TestFixture] - public class ComboboxTests : BunitTest + public class ComboBoxTests : BunitTest { @@ -23,9 +23,9 @@ public class ComboboxTests : BunitTest [Test] [TestCase(false)] //[TestCase(true)] - public void Combobox_InitialValueTest(bool multiSelection) + public void ComboBox_InitialValueTest(bool multiSelection) { - var comp = Context.RenderComponent(x => + var comp = Context.RenderComponent(x => { x.Add(c => c.SelectedValue, "1"); x.Add(c => c.MultiSelection, multiSelection); @@ -42,9 +42,9 @@ public void Combobox_InitialValueTest(bool multiSelection) [Test] //[TestCase(false)] [TestCase(true)] - public void Combobox_InitialValuesTest(bool multiSelection) + public void ComboBox_InitialValuesTest(bool multiSelection) { - var comp = Context.RenderComponent(x => + var comp = Context.RenderComponent(x => { x.Add(c => c.SelectedValues, new HashSet() { "1" }); x.Add(c => c.MultiSelection, multiSelection); @@ -57,9 +57,9 @@ public void Combobox_InitialValuesTest(bool multiSelection) } [Test] - public async Task Combobox_ValueBubblingTest() + public async Task ComboBox_ValueBubblingTest() { - var comp = Context.RenderComponent(); + var comp = Context.RenderComponent(); var combobox = comp.FindComponent>(); combobox.Instance.Value.Should().BeNull(); @@ -80,9 +80,9 @@ public async Task Combobox_ValueBubblingTest() } [Test] - public void Combobox_ValueBubblingTest_MultiSelection() + public void ComboBox_ValueBubblingTest_MultiSelection() { - var comp = Context.RenderComponent(x => + var comp = Context.RenderComponent(x => { x.Add(c => c.MultiSelection, true); }); @@ -103,9 +103,9 @@ public void Combobox_ValueBubblingTest_MultiSelection() } [Test] - public async Task Combobox_ValueChangeEventCountTest() + public async Task ComboBox_ValueChangeEventCountTest() { - var comp = Context.RenderComponent(x => + var comp = Context.RenderComponent(x => { x.Add(c => c.MultiSelection, false); }); @@ -130,9 +130,9 @@ public async Task Combobox_ValueChangeEventCountTest() } [Test] - public async Task Combobox_ValueChangeEventCountTest_MultiSelection() + public async Task ComboBox_ValueChangeEventCountTest_MultiSelection() { - var comp = Context.RenderComponent(x => + var comp = Context.RenderComponent(x => { x.Add(c => c.MultiSelection, true); }); @@ -156,9 +156,9 @@ public async Task Combobox_ValueChangeEventCountTest_MultiSelection() /// Click should open the Menu and selecting a value should update the bindable value. /// [Test] - public async Task ComboboxTest1() + public async Task ComboBoxTest1() { - var comp = Context.RenderComponent(); + var comp = Context.RenderComponent(); // print the generated html //Console.WriteLine(comp.Markup); // select elements needed for the test @@ -196,9 +196,9 @@ public async Task ComboboxTest1() } [Test] - public async Task ComboboxClearableTest() + public async Task ComboBoxClearableTest() { - var comp = Context.RenderComponent(); + var comp = Context.RenderComponent(); var combobox = comp.FindComponent>(); var input = comp.Find("div.mud-input-control"); @@ -224,7 +224,7 @@ public async Task ComboboxClearableTest() [Test] public void MultiSelect_SelectAll() { - var comp = Context.RenderComponent(); + var comp = Context.RenderComponent(); // select element needed for the test var combobox = comp.FindComponent>(); var menu = comp.Find("div.mud-popover"); @@ -245,9 +245,9 @@ public void MultiSelect_SelectAll() } [Test] - public async Task Combobox_MultiSelectEditable() + public async Task ComboBox_MultiSelectEditable() { - var comp = Context.RenderComponent(); + var comp = Context.RenderComponent(); // print the generated html Console.WriteLine(comp.Markup); // select elements needed for the test @@ -275,9 +275,9 @@ public async Task Combobox_MultiSelectEditable() /// Click should not close the menu and selecting multiple values should update the bindable value with a comma separated list. /// [Test] - public async Task Combobox_MultiSelectTest1() + public async Task ComboBox_MultiSelectTest1() { - var comp = Context.RenderComponent(); + var comp = Context.RenderComponent(); // print the generated html Console.WriteLine(comp.Markup); // select elements needed for the test @@ -333,9 +333,9 @@ await comp.InvokeAsync(() => } [Test] - public async Task ComboboxTest_KeyboardNavigation_SingleSelect() + public async Task ComboBoxTest_KeyboardNavigation_SingleSelect() { - var comp = Context.RenderComponent(); + var comp = Context.RenderComponent(); // print the generated html //Console.WriteLine(comp.Markup); // select elements needed for the test @@ -420,9 +420,9 @@ public async Task ComboboxTest_KeyboardNavigation_SingleSelect() } [Test] - public async Task ComboboxTest_KeyboardNavigation_ToggleSelect() + public async Task ComboBoxTest_KeyboardNavigation_ToggleSelect() { - var comp = Context.RenderComponent(); + var comp = Context.RenderComponent(); var combobox = comp.FindComponent>().Instance; combobox.ToggleSelection = true; await comp.InvokeAsync(() => combobox.HandleKeyDown(new KeyboardEventArgs() { Key = "Enter", Type = "keydown", })); @@ -441,9 +441,9 @@ public async Task ComboboxTest_KeyboardNavigation_ToggleSelect() } [Test] - public async Task ComboboxTest_KeyboardNavigation_MultiSelect() + public async Task ComboBoxTest_KeyboardNavigation_MultiSelect() { - var comp = Context.RenderComponent(); + var comp = Context.RenderComponent(); var combobox = comp.FindComponent>(); await comp.InvokeAsync(() => combobox.Instance.HandleKeyDown(new KeyboardEventArgs() { Key = " ", Type = "keydown", })); diff --git a/ComponentViewer.Docs/Pages/Examples/ComboboxExample1.razor b/ComponentViewer.Docs/Pages/Examples/ComboboxExample1.razor index 64992850..ed5e77c7 100644 --- a/ComponentViewer.Docs/Pages/Examples/ComboboxExample1.razor +++ b/ComponentViewer.Docs/Pages/Examples/ComboboxExample1.razor @@ -46,10 +46,10 @@ - Item Count: @_combobox?.Items.Count + Item Count: @(_combobox?.Items.Count ?? 0) Value: @_value Text: @_text - Selected Values (@(_selectedValues?.Count())): @(string.Join(", ", _selectedValues ?? new List())) + Selected Values (@(_selectedValues?.Count() ?? 0)): @(string.Join(", ", _selectedValues ?? new List()))