private void NullAllocation_BadRequest() { // Given var fooAllocation = MockAllocation.GetTestAllocation(); var fooProvider = new AllocationProvider(fooAllocation); var fooController = new TeamController(fooProvider); // When var nullRes = fooController.AddAllocationToSeniorTeam(null); // Then Assert.IsType <BadRequestObjectResult>(nullRes); }
private void ValidAllocation_Ok() { // Given var fooAllocation = MockAllocation.GetTestAllocation(); var fooProvider = new AllocationProvider(fooAllocation); var fooController = new TeamController(fooProvider); var fooNewSeniorAllocation = new SeniorAllocationRequest(MockSeniorTeam.GetMutantSeniorTeam().AsSeniorTeam); // When var seniorRes = fooController.AddAllocationToSeniorTeam(fooNewSeniorAllocation); // Then Assert.IsType <OkObjectResult>(seniorRes); }