public static void UnconfiguredAsyncMethod( IFooBarService fake, Task task) { "Given a fake" .x(() => fake = A.Fake <IFooBarService>()); "When calling an unconfigured async method with no result" .x(() => task = fake.CommandAsync()); "Then it should return a completed task" .x(() => task.IsCompleted.Should().BeTrue()); }
public static void UnconfiguredAsyncMethod( IFooBarService fake, Task task) { "Given a fake" .x(() => fake = A.Fake<IFooBarService>()); "When calling an unconfigured async method with no result" .x(() => task = fake.CommandAsync()); "Then it should return a completed task" .x(() => task.IsCompleted.Should().BeTrue()); }
public static void UnconfiguredAsyncMethodReturnValueOfNonDummyableType( IFooBarService fake, Task <Bar> task) { "Given a fake" .x(() => fake = A.Fake <IFooBarService>()); "When calling an unconfigured async method with a result of a non-dummyable type" .x(() => task = fake.GetBarAsync()); "Then it should return a completed task" .x(() => task.IsCompleted.Should().BeTrue()); "And the task's result should be null" .x(() => task.Result.Should().BeNull()); }
public static void UnconfiguredAsyncMethodWithReturnValueOfTypeInt( IFooBarService fake, Task <int> task) { "Given a fake" .x(() => fake = A.Fake <IFooBarService>()); "When calling an unconfigured async method with a result of type int" .x(() => task = fake.QueryAsync()); "Then it should return a completed task" .x(() => task.IsCompleted.Should().BeTrue()); "And the task's result should be a dummy value" .x(() => task.Result.Should().Be(0)); }
public static void UnconfiguredAsyncMethodReturnValueOfNonDummyableType( IFooBarService fake, Task<Bar> task) { "Given a fake" .x(() => fake = A.Fake<IFooBarService>()); "When calling an unconfigured async method with a result of a non-dummyable type" .x(() => task = fake.GetBarAsync()); "Then it should return a completed task" .x(() => task.IsCompleted.Should().BeTrue()); "And the task's result should be null" .x(() => task.Result.Should().BeNull()); }
public static void UnconfiguredAsyncMethodWithReturnValueOfTypeInt( IFooBarService fake, Task<int> task) { "Given a fake" .x(() => fake = A.Fake<IFooBarService>()); "When calling an unconfigured async method with a result of type int" .x(() => task = fake.QueryAsync()); "Then it should return a completed task" .x(() => task.IsCompleted.Should().BeTrue()); "And the task's result should be a dummy value" .x(() => task.Result.Should().Be(0)); }
public HomeController(IFooBarService barService, IFooBar2Service bar2Service, ISomeOtherInterface someOtherInterface) { _barService = barService; _bar2Service = bar2Service; _someOtherInterface = someOtherInterface; }
public ValuesController(IFooBarService fooBarService) { _fooBarService = fooBarService; }