Skip to content

Commit 59a7126

Browse files
committed
Refactoring - used short namespaces names, removed unnecessary spaces and empty lines.
1 parent 7d27fb1 commit 59a7126

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

test/MyTested.AspNetCore.Mvc.ViewComponents.Test/BuildersTests/InvocationsTests/ShouldHaveTests/ShouldHaveViewComponentAttributesTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
{
33
using Exceptions;
44
using Microsoft.AspNetCore.Mvc;
5-
using MyTested.AspNetCore.Mvc.Test.Setups.Common;
65
using Setups;
6+
using Setups.Common;
77
using Setups.ViewComponents;
88
using Xunit;
99
using Xunit.Sdk;

test/MyTested.AspNetCore.Mvc.ViewComponents.Test/BuildersTests/ViewComponentResultTests/ViewTestBuilderTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ public void WithModelOfTypeShouldThrowExceptionWithoutModel()
174174
"When invoking ViewResultComponent expected response model to be of ResponseModel type, but instead received null.");
175175
}
176176

177-
178177
[Fact]
179178
public void WithGenericModelShouldNotThrowException()
180179
{

test/MyTested.AspNetCore.Mvc.ViewComponents.Test/PluginsTests/ViewComponentsTestPluginTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
{
33
using System;
44
using Microsoft.Extensions.DependencyInjection;
5-
using MyTested.AspNetCore.Mvc.Plugins;
6-
using MyTested.AspNetCore.Mvc.Test.Setups.ViewComponents;
5+
using Plugins;
6+
using Setups.ViewComponents;
77
using Xunit;
88

99
public class ViewComponentsTestPluginTests

test/MyTested.AspNetCore.Mvc.ViewComponents.Test/ServicesTests.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.Collections.Generic;
44
using System.Threading.Tasks;
55
using Exceptions;
6+
using Internal.Contracts;
67
using Internal.ViewComponents;
78
using Microsoft.AspNetCore.Mvc;
89
using Microsoft.AspNetCore.Mvc.Abstractions;
@@ -11,7 +12,6 @@
1112
using Microsoft.AspNetCore.Mvc.ViewComponents;
1213
using Microsoft.AspNetCore.Mvc.ViewFeatures;
1314
using Microsoft.Extensions.DependencyInjection;
14-
using MyTested.AspNetCore.Mvc.Internal.Contracts;
1515
using Setups;
1616
using Setups.Services;
1717
using Setups.ViewComponents;
@@ -558,14 +558,14 @@ public void ViewComponentDescriptorCacheShouldWorkCorrectlyAndReturnDescriptor()
558558
MyApplication.StartsFrom<DefaultStartup>();
559559

560560
MyViewComponent<NormalComponent>
561-
.InvokedWith(c => c.Invoke())
562-
.ShouldPassForThe<NormalComponent>(vc =>
563-
{
564-
var cache = vc.HttpContext.RequestServices.GetService<IViewComponentDescriptorCache>();
565-
var viewComponentDescriptor = cache.GetViewComponentDescriptor(vc.GetType().GetMethod("Invoke"));
566-
567-
Assert.True(viewComponentDescriptor.GetType() == typeof(ViewComponentDescriptor));
568-
});
561+
.InvokedWith(c => c.Invoke())
562+
.ShouldPassForThe<NormalComponent>(vc =>
563+
{
564+
var cache = vc.HttpContext.RequestServices.GetService<IViewComponentDescriptorCache>();
565+
var viewComponentDescriptor = cache.GetViewComponentDescriptor(vc.GetType().GetMethod("Invoke"));
566+
567+
Assert.True(viewComponentDescriptor.GetType() == typeof(ViewComponentDescriptor));
568+
});
569569

570570
MyApplication.StartsFrom<DefaultStartup>();
571571
}

0 commit comments

Comments
 (0)