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); }