Skip to content

Commit df41d67

Browse files
committed
Removed unnecessary indentations, replaced the short names in the lambda functions with more appropriate.
1 parent 573f207 commit df41d67

File tree

5 files changed

+49
-49
lines changed

5 files changed

+49
-49
lines changed

test/MyTested.AspNetCore.Mvc.Controllers.Views.ActionResults.Test/BuildersTests/ActionResultsTests/JsonTests/JsonTestBuilderTests.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ public void WithDefaultJsonSettingsShouldNotThrowExceptionAndPassAssertions()
2626
.Instance()
2727
.Calling(c => c.JsonAction())
2828
.ShouldReturn()
29-
.Json(json => json
30-
.WithDefaultJsonSerializerSettings()
31-
.AndAlso()
32-
.Passing(j =>
33-
{
34-
Assert.Null(j.SerializerSettings);
35-
}));
29+
.Json(result => result
30+
.WithDefaultJsonSerializerSettings()
31+
.AndAlso()
32+
.Passing(json =>
33+
{
34+
Assert.Null(json.SerializerSettings);
35+
}));
3636
}
3737

3838
[Fact]

test/MyTested.AspNetCore.Mvc.Controllers.Views.ActionResults.Test/BuildersTests/ActionResultsTests/ViewTests/ViewComponentTestBuilderTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
namespace MyTested.AspNetCore.Mvc.Test.BuildersTests.ActionResultsTests.ViewTests
22
{
3-
using System.Collections.Generic;
43
using Exceptions;
54
using Setups;
65
using Setups.Controllers;
76
using Setups.Models;
7+
using System.Collections.Generic;
88
using Xunit;
99

1010
public class ViewComponentTestBuilderTests

test/MyTested.AspNetCore.Mvc.Controllers.Views.ActionResults.Test/BuildersTests/ActionResultsTests/ViewTests/ViewTestBuilderTests.cs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ public void WithViewEngineShouldNotThrowExceptionWithValidViewEngineAndPassAsser
4242
.Instance()
4343
.Calling(c => c.ViewWithViewEngine(viewEngine))
4444
.ShouldReturn()
45-
.View(view => view
45+
.View(result => result
4646
.WithViewEngine(viewEngine)
4747
.AndAlso()
48-
.Passing(v =>
48+
.Passing(view =>
4949
{
50-
Assert.NotNull(v.ViewEngine);
51-
Assert.IsAssignableFrom<IViewEngine>(v.ViewEngine);
52-
Assert.True(typeof(CustomViewEngine) == v.ViewEngine.GetType());
50+
Assert.NotNull(view.ViewEngine);
51+
Assert.IsAssignableFrom<IViewEngine>(view.ViewEngine);
52+
Assert.True(typeof(CustomViewEngine) == view.ViewEngine.GetType());
5353
}));
5454
}
5555

@@ -60,10 +60,10 @@ public void WithViewEngineShouldNotThrowExceptionWithBuiltInViewAndPassAssertion
6060
.Instance()
6161
.Calling(c => c.View())
6262
.ShouldReturn()
63-
.View(view => view
64-
.Passing(v =>
63+
.View(result => result
64+
.Passing(view =>
6565
{
66-
Assert.Null(v.ViewEngine);
66+
Assert.Null(view.ViewEngine);
6767
}));
6868
}
6969

@@ -222,14 +222,14 @@ public void WithViewEngineShouldNotThrowExceptionWithValidViewEngineForPartialsA
222222
.WithoutValidation()
223223
.Calling(c => c.PartialViewWithViewEngine(viewEngine))
224224
.ShouldReturn()
225-
.PartialView(partialView => partialView
225+
.PartialView(result => result
226226
.WithViewEngine(viewEngine)
227227
.AndAlso()
228-
.Passing(pv =>
228+
.Passing(partialView =>
229229
{
230-
Assert.NotNull(pv.ViewEngine);
231-
Assert.IsAssignableFrom<IViewEngine>(pv.ViewEngine);
232-
Assert.True(typeof(CustomViewEngine) == pv.ViewEngine.GetType());
230+
Assert.NotNull(partialView.ViewEngine);
231+
Assert.IsAssignableFrom<IViewEngine>(partialView.ViewEngine);
232+
Assert.True(typeof(CustomViewEngine) == partialView.ViewEngine.GetType());
233233
}));
234234
}
235235

test/MyTested.AspNetCore.Mvc.Controllers.Views.ActionResults.Test/BuildersTests/ActionsTests/ShouldReturnTests/ShouldReturnViewComponentTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ public void ShouldReturnViewComponentShouldNotThrowExceptionWithViewComponentNam
4949
.Instance()
5050
.Calling(c => c.ViewComponent("MyComponent"))
5151
.ShouldReturn()
52-
.ViewComponent(viewComponent => viewComponent
52+
.ViewComponent(result => result
5353
.WithName("MyComponent")
5454
.AndAlso()
55-
.Passing(vc =>
55+
.Passing(viewComponent =>
5656
{
57-
Assert.NotNull(vc);
58-
Assert.NotEmpty(vc.ViewComponentName);
59-
Assert.True(typeof(ViewComponentResult) == vc.GetType());
57+
Assert.NotNull(viewComponent);
58+
Assert.NotEmpty(viewComponent.ViewComponentName);
59+
Assert.True(typeof(ViewComponentResult) == viewComponent.GetType());
6060
}));
6161
}
6262

test/MyTested.AspNetCore.Mvc.Controllers.Views.ActionResults.Test/BuildersTests/ActionsTests/ShouldReturnTests/ShouldReturnViewTests.cs

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
{
33
using Exceptions;
44
using Microsoft.AspNetCore.Mvc;
5-
using MyTested.AspNetCore.Mvc.Test.Setups.Models;
65
using Setups;
76
using Setups.Controllers;
7+
using Setups.Models;
88
using System.Collections.Generic;
99
using Xunit;
1010

@@ -28,12 +28,12 @@ public void ShouldReturnViewWithNameShouldNotThrowExceptionAndPassAssertions()
2828
.Instance()
2929
.Calling(c => c.IndexView())
3030
.ShouldReturn()
31-
.View(view => view
32-
.Passing((v) =>
31+
.View(result => result
32+
.Passing(view =>
3333
{
34-
Assert.False(string.IsNullOrEmpty(v.ViewName));
35-
Assert.Equal("Index", v.ViewName);
36-
Assert.True(typeof(ViewResult) == v.GetType());
34+
Assert.False(string.IsNullOrEmpty(view.ViewName));
35+
Assert.Equal("Index", view.ViewName);
36+
Assert.True(typeof(ViewResult) == view.GetType());
3737
}));
3838
}
3939

@@ -55,10 +55,10 @@ public void ShouldReturnViewWithNameShouldNotThrowExceptionWithCorrectViewResult
5555
.Instance()
5656
.Calling(c => c.IndexView())
5757
.ShouldReturn()
58-
.View(view => view
58+
.View(result => result
5959
.WithName("Index")
6060
.AndAlso()
61-
.Passing(v => v.GetType() == typeof(ViewResult)));
61+
.Passing(view => view.GetType() == typeof(ViewResult)));
6262
}
6363

6464
[Fact]
@@ -143,12 +143,12 @@ public void ShouldReturnPartialViewWithNameShouldNotThrowExceptionAndPassAsserti
143143
.Instance()
144144
.Calling(c => c.IndexPartialView())
145145
.ShouldReturn()
146-
.PartialView(view => view
147-
.Passing(v =>
146+
.PartialView(result => result
147+
.Passing(partialView =>
148148
{
149-
Assert.False(string.IsNullOrEmpty(v.ViewName));
150-
Assert.Equal("_IndexPartial", v.ViewName);
151-
Assert.True(typeof(PartialViewResult) == v.GetType());
149+
Assert.False(string.IsNullOrEmpty(partialView.ViewName));
150+
Assert.Equal("_IndexPartial", partialView.ViewName);
151+
Assert.True(typeof(PartialViewResult) == partialView.GetType());
152152
}));
153153
}
154154

@@ -218,11 +218,11 @@ public void ShouldReturnViewWithDefaultNameShouldNotThrowExceptionAndPassAsserti
218218
.Instance()
219219
.Calling(c => c.DefaultView())
220220
.ShouldReturn()
221-
.View(view => view
222-
.Passing(v =>
221+
.View(result => result
222+
.Passing(view =>
223223
{
224-
Assert.True(string.IsNullOrEmpty(v.ViewName));
225-
Assert.True(v.GetType() == typeof(ViewResult));
224+
Assert.True(string.IsNullOrEmpty(view.ViewName));
225+
Assert.True(view.GetType() == typeof(ViewResult));
226226
}));
227227
}
228228

@@ -246,9 +246,9 @@ public void ShouldReturnViewWithDefaultNameAndCustomViewResultTypeShouldNotThrow
246246
.Instance()
247247
.Calling(c => c.CustomViewResult())
248248
.ShouldReturn()
249-
.View(view => view
249+
.View(result => result
250250
.WithDefaultName()
251-
.Passing(v => v.GetType() == typeof(ViewResult)));
251+
.Passing(view => view.GetType() == typeof(ViewResult)));
252252
}
253253

254254
[Fact]
@@ -269,11 +269,11 @@ public void ShouldReturnPartialViewWithDefaultNameShouldNotThrowExceptionAndPass
269269
.Instance()
270270
.Calling(c => c.DefaultPartialView())
271271
.ShouldReturn()
272-
.PartialView(view => view
273-
.Passing(v =>
272+
.PartialView(result => result
273+
.Passing(partialView =>
274274
{
275-
Assert.True(string.IsNullOrEmpty(v.ViewName));
276-
Assert.True(v.GetType() == typeof(PartialViewResult));
275+
Assert.True(string.IsNullOrEmpty(partialView.ViewName));
276+
Assert.True(partialView.GetType() == typeof(PartialViewResult));
277277
}));
278278
}
279279

0 commit comments

Comments
 (0)