Skip to content

Commit 4eae11b

Browse files
authored
chore(bunit): bump version 2.0 (#703)
1 parent c182daf commit 4eae11b

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

test/UnitTestEditor/BootstrapBlazorTestBase.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
1+
// Copyright (c) BootstrapBlazor & Argo Zhang (argo@live.ca). All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33
// Website: https://www.blazor.zone or https://argozhang.github.io/
44

@@ -9,13 +9,13 @@ namespace UnitTestEditor;
99

1010
public class BootstrapBlazorTestBase : IDisposable
1111
{
12-
protected TestContext Context { get; }
12+
protected BunitContext Context { get; }
1313

1414
protected ICacheManager Cache { get; }
1515

1616
public BootstrapBlazorTestBase()
1717
{
18-
Context = new TestContext();
18+
Context = new BunitContext();
1919
Context.JSInterop.Mode = JSRuntimeMode.Loose;
2020

2121
ConfigureServices(Context.Services);

test/UnitTestEditor/EditorTest.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
1+
// Copyright (c) BootstrapBlazor & Argo Zhang (argo@live.ca). All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33
// Website: https://www.blazor.zone or https://argozhang.github.io/
44

@@ -12,7 +12,7 @@ public class EditorTest : BootstrapBlazorTestBase
1212
public async Task Editor_Ok()
1313
{
1414
var value = new Foo();
15-
var cut = Context.RenderComponent<Editor>(pb =>
15+
var cut = Context.Render<Editor>(pb =>
1616
{
1717
pb.Add(a => a.Value, value.Name);
1818
pb.Add(a => a.ValueChanged, v => value.Name = v);
@@ -23,7 +23,7 @@ public async Task Editor_Ok()
2323
await cut.InvokeAsync(() => cut.Instance.Update("Test"));
2424
Assert.Equal("Test", value.Name);
2525

26-
cut.SetParametersAndRender(pb =>
26+
cut.Render(pb =>
2727
{
2828
pb.Add(a => a.OnValueChanged, v =>
2929
{
@@ -39,7 +39,7 @@ public async Task Editor_Ok()
3939
[Fact]
4040
public async Task CustomerToolbarButtons_Ok()
4141
{
42-
var cut = Context.RenderComponent<Editor>(pb =>
42+
var cut = Context.Render<Editor>(pb =>
4343
{
4444
pb.Add(a => a.Value, "Test");
4545
pb.Add(a => a.CustomerToolbarButtons, new EditorToolbarButton[]
@@ -65,7 +65,7 @@ public async Task CustomerToolbarButtons_Ok()
6565
Assert.Equal("Tooltip1", toolbarButtons!.First().Tooltip);
6666

6767
var name = "";
68-
cut.SetParametersAndRender(pb =>
68+
cut.Render(pb =>
6969
{
7070
pb.Add(a => a.OnClickButton, v =>
7171
{
@@ -80,7 +80,7 @@ public async Task CustomerToolbarButtons_Ok()
8080
[Fact]
8181
public async Task DoMethodAsync_Ok()
8282
{
83-
var cut = Context.RenderComponent<Editor>(pb =>
83+
var cut = Context.Render<Editor>(pb =>
8484
{
8585
pb.Add(a => a.Value, "Test");
8686
});

test/UnitTestRegion/ServiceTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) BootstrapBlazor & Argo Zhang (argo@live.ca). All rights reserved.
1+
// Copyright (c) BootstrapBlazor & Argo Zhang (argo@live.ca). All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33
// Website: https://www.blazor.zone or https://argozhang.github.io/
44

@@ -19,7 +19,7 @@ public void GetCities_Ok()
1919
Assert.Equal(34, provinces.Count);
2020

2121
var cities = regionService.GetCities("北京市");
22-
Assert.Empty(cities);
22+
Assert.Single(cities);
2323

2424
cities = regionService.GetCities("河北省");
2525
Assert.Equal(11, cities.Count);

0 commit comments

Comments
 (0)