We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14e5c19 commit 6d7285aCopy full SHA for 6d7285a
2 files changed
src/bunit.generators/Web.Stubs/StubGenerator.cs
@@ -1,7 +1,6 @@
1
using System;
2
using System.Collections.Generic;
3
using System.Collections.Immutable;
4
-using System.Diagnostics.CodeAnalysis;
5
using System.Linq;
6
using System.Text;
7
using Microsoft.CodeAnalysis;
tests/bunit.generators.tests/Web.Stub/StubTests.cs
@@ -12,4 +12,14 @@ public void Stubbed_component_has_same_parameters()
12
var child = cut.FindComponent<CounterComponentStub>();
13
Assert.Equal(2, child.Instance.Count);
14
}
15
+
16
+ [Fact]
17
+ public void Stubbed_component_can_be_used_in_multiple_tests()
18
+ {
19
+ ComponentFactories.AddGeneratedStub<CounterComponent>();
20
21
+ var cut = RenderComponent<ParentComponent>();
22
23
+ Assert.True(cut.HasComponent<CounterComponentStub>());
24
+ }
25
0 commit comments