Skip to content

Commit 5903acf

Browse files
committed
Replaced controller methods in MyMvc (#133)
1 parent 0292674 commit 5903acf

File tree

1 file changed

+3
-4
lines changed
  • src/MyTested.AspNetCore.Mvc.Core

1 file changed

+3
-4
lines changed

src/MyTested.AspNetCore.Mvc.Core/MyMvc.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using Builders.Contracts.Application;
66
using Builders.Contracts.Controllers;
77
using Builders.Contracts.Routes;
8-
using Builders.Controllers;
98
using Builders.Routes;
109
using Internal.Application;
1110
using Internal.TestContexts;
@@ -63,7 +62,7 @@ public static IRouteTestBuilder Routes()
6362
public static IControllerBuilder<TController> Controller<TController>()
6463
where TController : class
6564
{
66-
return Controller((TController)null);
65+
return new MyController<TController>();
6766
}
6867

6968
/// <summary>
@@ -75,7 +74,7 @@ public static IControllerBuilder<TController> Controller<TController>()
7574
public static IControllerBuilder<TController> Controller<TController>(TController controller)
7675
where TController : class
7776
{
78-
return Controller(() => controller);
77+
return new MyController<TController>(controller);
7978
}
8079

8180
/// <summary>
@@ -87,7 +86,7 @@ public static IControllerBuilder<TController> Controller<TController>(TControlle
8786
public static IControllerBuilder<TController> Controller<TController>(Func<TController> construction)
8887
where TController : class
8988
{
90-
return new ControllerBuilder<TController>(new ControllerTestContext { ControllerConstruction = construction });
89+
return new MyController<TController>(construction);
9190
}
9291
}
9392
}

0 commit comments

Comments
 (0)