Skip to content

Commit

Permalink
Update previous test to match update
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-mrq committed Apr 22, 2024
1 parent 835e132 commit 9539e94
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public override void Setup()
[TestCase("Devices", "Devices")]
[TestCase("IoT Edge", "IoTEdge")]
[TestCase("LoRaWAN", "LoRaWAN")]
[TestCase("Site Management", "Site Management")]
[TestCase("Settings", "Settings")]
public async Task CollapseButtonNavGroupShouldSaveNewState(string title, string property)
{
Expand All @@ -60,6 +61,7 @@ public async Task CollapseButtonNavGroupShouldSaveNewState(string title, string
[TestCase("Devices", "Devices")]
[TestCase("IoT Edge", "IoTEdge")]
[TestCase("LoRaWAN", "LoRaWAN")]
[TestCase("Site Management", "Site Management")]
[TestCase("Settings", "Settings")]
public async Task ExpandButtonNavGroupShouldSaveState(string title, string property)
{
Expand Down Expand Up @@ -91,6 +93,7 @@ public async Task ExpandButtonNavGroupShouldSaveState(string title, string prope
[TestCase("Devices", "Devices")]
[TestCase("IoT Edge", "IoTEdge")]
[TestCase("LoRaWAN", "LoRaWAN")]
[TestCase("Site Management", "Site Management")]
[TestCase("Settings", "Settings")]
public async Task CollapseButtonNavGroupShouldSaveState(string title, string property)
{
Expand Down Expand Up @@ -121,6 +124,7 @@ public async Task CollapseButtonNavGroupShouldSaveState(string title, string pro
[TestCase("Devices", "Devices")]
[TestCase("IoT Edge", "IoTEdge")]
[TestCase("LoRaWAN", "LoRaWAN")]
[TestCase("Site Management", "Site Management")]
[TestCase("Settings", "Settings")]
public async Task WhenFalseCollapseNavGroupShouldBeCollapsed(string title, string property)
{
Expand All @@ -147,6 +151,7 @@ public async Task WhenFalseCollapseNavGroupShouldBeCollapsed(string title, strin
[TestCase("Devices", "Devices")]
[TestCase("IoT Edge", "IoTEdge")]
[TestCase("LoRaWAN", "LoRaWAN")]
[TestCase("Site Management", "Site Management")]
[TestCase("Settings", "Settings")]
public async Task WhenTrueCollapseNavGroupShouldBeExpanded(string title, string property)
{
Expand Down Expand Up @@ -179,7 +184,7 @@ public async Task NavGroupsExpendedValuesShouldBeTrueWhenFirstTime()
// Assert
var navGroups = cut.FindComponents<MudNavGroup>();

_ = navGroups.Count.Should().Be(4);
_ = navGroups.Count.Should().Be(5);
_ = navGroups.Should().OnlyContain(navGroup => navGroup.Instance.Expanded);

var navGroupExpandedDictionary = await this.localStorageService.GetItemAsync<Dictionary<string, bool>>(LocalStorageKey.CollapsibleNavMenu);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ public async Task GetListStateUnderTestExpectedBehavior()

_ = this.mockDeviceService.Setup(service => service.GetDevices(It.IsAny<string>(), It.IsAny<bool?>(),
It.IsAny<bool?>(), It.IsAny<int>(), It.IsAny<int>(), It.IsAny<string[]>(),
It.IsAny<Dictionary<string, string>>(), It.IsAny<string>(), It.IsAny<List<string>>()))
It.IsAny<Dictionary<string, string>>(), It.IsAny<string>(),
It.IsAny<List<string>>(), It.IsAny<string>()))
.ReturnsAsync(expectedPaginatedDevices);

var locationUrl = "http://location/devices";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ public async Task GetListStateUnderTestExpectedBehavior()

_ = this.mockDeviceService.Setup(service => service.GetDevices(It.IsAny<string>(), It.IsAny<bool?>(),
It.IsAny<bool?>(), It.IsAny<int>(), It.IsAny<int>(), It.IsAny<string[]>(),
It.IsAny<Dictionary<string, string>>(), It.IsAny<string>(), It.IsAny<List<string>>()))
It.IsAny<Dictionary<string, string>>(), It.IsAny<string>(),
It.IsAny<List<string>>(), It.IsAny<string>()))
.ReturnsAsync(expectedPaginatedDevices);

var locationUrl = "http://location/devices";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ public async Task GetDevices_CustomFilter_ReturnsExpectedDevices()
Color = "green"
}
},
DeviceModel = Fixture.Create<DeviceModel>()
DeviceModel = Fixture.Create<DeviceModel>(),
LayerId = Fixture.Create<string>()
};

var device2 = new Device
Expand All @@ -167,7 +168,8 @@ public async Task GetDevices_CustomFilter_ReturnsExpectedDevices()
Color = "green"
}
},
DeviceModel = Fixture.Create<DeviceModel>()
DeviceModel = Fixture.Create<DeviceModel>(),
LayerId = Fixture.Create<string>()
};

var expectedTotalDevicesCount = 1;
Expand Down

0 comments on commit 9539e94

Please sign in to comment.