forked from CodeBeamOrg/CodeBeam.MudBlazor.Extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTransferListTests.cs
More file actions
26 lines (24 loc) · 1.06 KB
/
TransferListTests.cs
File metadata and controls
26 lines (24 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using Bunit;
using FluentAssertions;
using MudExtensions.UnitTests.TestComponents;
namespace MudExtensions.UnitTests.Components
{
[TestFixture]
public class TransferListTests : BunitTest
{
[Test]
public async Task TransferListTransferAllTest()
{
var comp = Context.RenderComponent<TransferListTest>();
var transferList = comp.FindComponent<MudTransferList<string>>();
transferList.Instance.StartCollection.Should().Contain("Turkey");
transferList.Instance.StartCollection.Should().NotContain("China");
await comp.InvokeAsync(() => transferList.Instance.TransferAll(true));
transferList.Instance.StartCollection.Should().NotContain("Turkey");
transferList.Instance.EndCollection.Should().Contain("Turkey");
await comp.InvokeAsync(() => transferList.Instance.TransferAll(false));
transferList.Instance.StartCollection.Should().Contain("Turkey");
transferList.Instance.EndCollection.Should().NotContain("Turkey");
}
}
}