private void NullAllocationToValidPod_BadRequest() { // Given var fooAllocation = MockAllocation.GetTestAllocation(); var fooProvider = new AllocationProvider(fooAllocation); var fooController = new TeamController(fooProvider); // When var nullAllocRes = fooController.AddAllocationToPod(TeamType.A, null); // Then Assert.IsType <BadRequestObjectResult>(nullAllocRes); }
private void ValidAllocationToValidPod_Success() { // Given var fooAllocation = MockAllocation.GetTestAllocation(); var fooProvider = new AllocationProvider(fooAllocation); var fooController = new TeamController(fooProvider); var fooNewAllocation = new PodAllocationRequest(MockPodD.GetTestPodD().AsPod); // When var successRes = fooController.AddAllocationToPod(TeamType.A, fooNewAllocation); // Then Assert.IsType <JsonResult>(successRes); }
private void ValidAllocationToNullPod_BadRequest() { // Given var fooAllocation = MockAllocation.GetTestAllocation(); var fooProvider = new AllocationProvider(fooAllocation); var fooController = new TeamController(fooProvider); var fooNewAllocation = new PodAllocationRequest(MockPodD.GetTestPodD().AsPod); // When var nullTypeRes = fooController.AddAllocationToPod(null, fooNewAllocation); // Then Assert.IsType <BadRequestObjectResult>(nullTypeRes); }