public async Task GetAllActions_AsCrossPlantUser_ShouldGetActions() { // Act var actionDtos = await CrossPlantControllerTestsHelper.GetActionsAsync(UserType.CrossPlantUser); // Assert Assert.IsNotNull(actionDtos); Assert.IsTrue(actionDtos.Count > 0); AssertClosedActionWithAttachments( actionDtos.SingleOrDefault(a => a.Id == ActionIdUnderTest_WithAttachments_Closed_InPlantA), KnownPlantData.PlantA, KnownPlantData.PlantATitle); AssertClosedActionWithAttachments( actionDtos.SingleOrDefault(a => a.Id == ActionIdUnderTest_WithAttachments_Closed_InPlantB), KnownPlantData.PlantB, KnownPlantData.PlantBTitle); }
public async Task GetAllTags_AsCrossPlantUser_ShouldGetTags() { // Act var TagDtos = await CrossPlantControllerTestsHelper.GetTagsAsync(UserType.CrossPlantUser); // Assert Assert.IsNotNull(TagDtos); Assert.IsTrue(TagDtos.Count > 0); AssertTag( TagDtos.SingleOrDefault(a => a.Id == TagIdUnderTest_ForStandardTagWithAttachmentsAndActionAttachments_Started_InPlantA), KnownPlantData.PlantA, KnownPlantData.PlantATitle); AssertTag( TagDtos.SingleOrDefault(a => a.Id == TagIdUnderTest_ForStandardTagWithAttachmentsAndActionAttachments_Started_InPlantB), KnownPlantData.PlantB, KnownPlantData.PlantBTitle); }
public async Task GetActions_AsPlanner_ShouldReturnForbidden() => await CrossPlantControllerTestsHelper.GetActionsAsync( UserType.Planner, HttpStatusCode.Forbidden);
public async Task GetActions_AsAnonymous_ShouldReturnUnauthorized() => await CrossPlantControllerTestsHelper.GetActionsAsync( UserType.Anonymous, HttpStatusCode.Unauthorized);
public async Task GetTags_AsAdmin_ShouldReturnForbidden() => await CrossPlantControllerTestsHelper.GetTagsAsync( UserType.LibraryAdmin, HttpStatusCode.Forbidden);
public async Task GetTags_AsHacker_ShouldReturnForbidden() => await CrossPlantControllerTestsHelper.GetTagsAsync( UserType.Hacker, HttpStatusCode.Forbidden);