public async Task UploadActionAttachment_AsPreserver_ShouldUploadActionAttachment() { // Arrange var tagIdUnderTest = TagIdUnderTest_ForStandardTagWithAttachmentsAndActionAttachments_Started; var actionIdUnderTest = await TagsControllerTestsHelper.CreateActionAsync( UserType.Preserver, TestFactory.PlantWithAccess, tagIdUnderTest, Guid.NewGuid().ToString(), Guid.NewGuid().ToString()); var actionDetails = await TagsControllerTestsHelper.GetActionAsync( UserType.Preserver, TestFactory.PlantWithAccess, tagIdUnderTest, actionIdUnderTest); var attachmentCount = actionDetails.AttachmentCount; // Act await TagsControllerTestsHelper.UploadActionAttachmentAsync( UserType.Preserver, TestFactory.PlantWithAccess, tagIdUnderTest, actionIdUnderTest, FileToBeUploaded); // Assert actionDetails = await TagsControllerTestsHelper.GetActionAsync( UserType.Preserver, TestFactory.PlantWithAccess, tagIdUnderTest, actionIdUnderTest); Assert.AreEqual(attachmentCount + 1, actionDetails.AttachmentCount); }