@@ -18,6 +18,8 @@ public class CounterCSharpTest : BunitContext
1818#elif ( testFramework_mstest )
1919[ TestClass]
2020public class CounterCSharpTest : BunitContext
21+ #elif ( testFramework_tunit )
22+ public class CounterCSharpTest : BunitContext
2123#endif
2224{
2325#if ( testFramework_xunit )
@@ -33,13 +35,13 @@ public class CounterCSharpTest : BunitContext
3335#endif
3436
3537 public void CounterStartsAtZero ( )
36- {
37- // Arrange
38- var cut = Render < Counter > ( ) ;
38+ {
39+ // Arrange
40+ var cut = Render < Counter > ( ) ;
3941
40- // Assert that content of the paragraph shows counter at zero
41- cut . Find ( "p" ) . MarkupMatches ( "<p>Current count: 0</p>" ) ;
42- }
42+ // Assert that content of the paragraph shows counter at zero
43+ cut . Find ( "p" ) . MarkupMatches ( "<p>Current count: 0</p>" ) ;
44+ }
4345
4446#if ( testFramework_xunit )
4547 [ Fact ]
@@ -49,16 +51,18 @@ public void CounterStartsAtZero()
4951 [ Test ]
5052#elif ( testFramework_mstest )
5153 [ TestMethod ]
54+ #elif ( testFramework_tunit )
55+ [ Test ]
5256#endif
53- public void ClickingButtonIncrementsCounter ( )
54- {
55- // Arrange
56- var cut = Render < Counter > ( ) ;
57+ public void ClickingButtonIncrementsCounter ( )
58+ {
59+ // Arrange
60+ var cut = Render < Counter > ( ) ;
5761
58- // Act - click button to increment counter
59- cut . Find ( "button" ) . Click ( ) ;
62+ // Act - click button to increment counter
63+ cut . Find ( "button" ) . Click ( ) ;
6064
61- // Assert that the counter was incremented
62- cut . Find ( "p" ) . MarkupMatches ( "<p>Current count: 1</p>" ) ;
63- }
65+ // Assert that the counter was incremented
66+ cut . Find ( "p" ) . MarkupMatches ( "<p>Current count: 1</p>" ) ;
67+ }
6468}
0 commit comments