Skip to content

Commit ffc897f

Browse files
committed
Updates to passing parameters
1 parent b3d7f98 commit ffc897f

41 files changed

Lines changed: 804 additions & 205 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/samples/samples.sln

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "bunit.docs.nunit.samples",
1313
EndProject
1414
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "bunit.docs.xunit.samples", "tests\xunit\bunit.docs.xunit.samples.csproj", "{3B8B3B0E-CA33-4C76-901D-219F5FF848B3}"
1515
EndProject
16+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bunit.docs.razor.samples", "tests\razor\bunit.docs.razor.samples.csproj", "{C92CB47E-8A70-409C-9213-8D743BB29366}"
17+
EndProject
1618
Global
1719
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1820
Debug|Any CPU = Debug|Any CPU
@@ -71,6 +73,18 @@ Global
7173
{3B8B3B0E-CA33-4C76-901D-219F5FF848B3}.Release|x64.Build.0 = Release|Any CPU
7274
{3B8B3B0E-CA33-4C76-901D-219F5FF848B3}.Release|x86.ActiveCfg = Release|Any CPU
7375
{3B8B3B0E-CA33-4C76-901D-219F5FF848B3}.Release|x86.Build.0 = Release|Any CPU
76+
{C92CB47E-8A70-409C-9213-8D743BB29366}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
77+
{C92CB47E-8A70-409C-9213-8D743BB29366}.Debug|Any CPU.Build.0 = Debug|Any CPU
78+
{C92CB47E-8A70-409C-9213-8D743BB29366}.Debug|x64.ActiveCfg = Debug|Any CPU
79+
{C92CB47E-8A70-409C-9213-8D743BB29366}.Debug|x64.Build.0 = Debug|Any CPU
80+
{C92CB47E-8A70-409C-9213-8D743BB29366}.Debug|x86.ActiveCfg = Debug|Any CPU
81+
{C92CB47E-8A70-409C-9213-8D743BB29366}.Debug|x86.Build.0 = Debug|Any CPU
82+
{C92CB47E-8A70-409C-9213-8D743BB29366}.Release|Any CPU.ActiveCfg = Release|Any CPU
83+
{C92CB47E-8A70-409C-9213-8D743BB29366}.Release|Any CPU.Build.0 = Release|Any CPU
84+
{C92CB47E-8A70-409C-9213-8D743BB29366}.Release|x64.ActiveCfg = Release|Any CPU
85+
{C92CB47E-8A70-409C-9213-8D743BB29366}.Release|x64.Build.0 = Release|Any CPU
86+
{C92CB47E-8A70-409C-9213-8D743BB29366}.Release|x86.ActiveCfg = Release|Any CPU
87+
{C92CB47E-8A70-409C-9213-8D743BB29366}.Release|x86.Build.0 = Release|Any CPU
7488
EndGlobalSection
7589
GlobalSection(SolutionProperties) = preSolution
7690
HideSolutionNode = FALSE
@@ -79,6 +93,7 @@ Global
7993
{C2060A20-8C56-4678-B65C-DCF52D70223D} = {FC897929-3A4D-4276-9AF4-C77B0FAF221E}
8094
{0BC8DBEB-500A-4DB2-9123-7617D24E5053} = {FC897929-3A4D-4276-9AF4-C77B0FAF221E}
8195
{3B8B3B0E-CA33-4C76-901D-219F5FF848B3} = {FC897929-3A4D-4276-9AF4-C77B0FAF221E}
96+
{C92CB47E-8A70-409C-9213-8D743BB29366} = {FC897929-3A4D-4276-9AF4-C77B0FAF221E}
8297
EndGlobalSection
8398
GlobalSection(ExtensibilityGlobals) = postSolution
8499
SolutionGuid = {4CDEB3A4-44B9-4715-9082-28DA841514DB}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
@code
2+
{
3+
[Fact]
4+
public void Test()
5+
{
6+
using var ctx = new TestContext();
7+
8+
var isDarkTheme = true;
9+
10+
var cut = ctx.Render(@<CascadingValue Value="isDarkTheme">
11+
<CascadingParams />
12+
</CascadingValue>);
13+
}
14+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@code
2+
{
3+
[Fact]
4+
public void Test()
5+
{
6+
using var ctx = new TestContext();
7+
8+
var cut = ctx.Render(@<CascadingValue Name="LoggedInUser" Value=@("Name of User")>
9+
<CascadingParams />
10+
</CascadingValue>);
11+
}
12+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
@code
2+
{
3+
[Fact]
4+
public void Test()
5+
{
6+
using var ctx = new TestContext();
7+
8+
var isDarkTheme = true;
9+
10+
var cut = ctx.Render(@<CascadingValue Name="LoggedInUser" Value=@("Name of User")>
11+
<CascadingValue Name="LoggedInEmail" Value=@("user@example.com")>
12+
<CascadingValue Value="isDarkTheme">
13+
<CascadingParams />
14+
</CascadingValue>
15+
</CascadingValue>
16+
</CascadingValue>);
17+
}
18+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@code
2+
{
3+
[Fact]
4+
public void Test()
5+
{
6+
using var ctx = new TestContext();
7+
8+
var cut = ctx.Render(@<ChildContentParams>
9+
<h1>Hello World</h1>
10+
</ChildContentParams>);
11+
}
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@code
2+
{
3+
[Fact]
4+
public void Test()
5+
{
6+
using var ctx = new TestContext();
7+
8+
var cut = ctx.Render(@<ChildContentParams>
9+
<Counter />
10+
</ChildContentParams>);
11+
}
12+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
@code
2+
{
3+
[Fact]
4+
public void Test()
5+
{
6+
using var ctx = new TestContext();
7+
8+
var cut = ctx.Render(@<ChildContentParams>
9+
<Alert Heading="Alert heading" Type=@AlertType.Warning>
10+
<p>Hello World</p>
11+
</Alert>
12+
</ChildContentParams>);
13+
}
14+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
@code
2+
{
3+
[Fact]
4+
public void Test()
5+
{
6+
using var ctx = new TestContext();
7+
8+
var cut = ctx.Render(@<ChildContentParams>
9+
<h1>Below you will find a most interesting alert!</h1>
10+
<Alert Heading="Alert heading" Type=@AlertType.Warning>
11+
<p>Hello World</p>
12+
</Alert>
13+
</ChildContentParams>);
14+
}
15+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
@code
2+
{
3+
[Fact]
4+
public void Test()
5+
{
6+
using var ctx = new TestContext();
7+
8+
Action<MouseEventArgs> onClickHandler = _ => { };
9+
Action onSomethingHandler = () => { };
10+
11+
var cut = ctx.Render(@<EventCallbackParams
12+
OnClick="onClickHandler"
13+
OnSomething="onSomethingHandler" />);
14+
}
15+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@code
2+
{
3+
[Fact]
4+
public void Test()
5+
{
6+
using var ctx = new TestContext();
7+
8+
var cut = ctx.Render<HelloWorld>(@<Wrapper>
9+
<HelloWorld />
10+
</Wrapper>);
11+
}
12+
}

0 commit comments

Comments
 (0)