public async Task GetAsync_GetFactorialObjectAsync() { var response = await CreateServiceClient().GetAsync(new GetFactorialObjectAsync { ForNumber = Param }); Assert.That(response.Result, Is.EqualTo(FactorialService.GetFactorial(Param))); }
public void GetSync_GetFactorialDelayAsync() { var response = CreateServiceClient().Get(new GetFactorialDelayAsync { ForNumber = Param }); Assert.That(response.Result, Is.EqualTo(FactorialService.GetFactorial(Param))); }
public async Task Can_call_GetAsync_on_GetFactorial_using_RestClientAsync() { var asyncClient = CreateServiceClient(); var response = await asyncClient.GetAsync <GetFactorialResponse>("factorial/sync/3"); Assert.That(response, Is.Not.Null, "No response received"); Assert.That(response.Result, Is.EqualTo(FactorialService.GetFactorial(3))); }
public void testFactorialFive() { //Arrange FactorialService factorialService = new FactorialService(); //Act int result = factorialService.Calculate(5); //Assert Assert.Equal(120, result); }
public void TestFactorialZero() { //Arrange FactorialService factorialService = new FactorialService(); //Act int result = factorialService.Calculate(0); //Assert Assert.Equal(1, result); }
public FactorialService_FactorialShould() { _factorialService = new FactorialService(); }
public void TestInit() { _mockedFactorialComputationService = Substitute.For <IFactorialComputationService>(); _factorialService = new FactorialService(_mockedFactorialComputationService); }