public void EditCentreDetailsPostSave_without_previewing_signature_image_fails_validation() { // Given var model = new EditCentreDetailsViewModel { NotifyEmail = "*****@*****.**", BannerText = "Banner text", CentreSignatureFile = A.Fake <FormFile>(), }; // When var result = controller.EditCentreDetails(model, "save"); // Then A.CallTo( () => centresDataService.UpdateCentreDetails( A <int> ._, A <string> ._, A <string> ._, A <byte[]?> ._, A <byte[]?> ._ ) ) .MustNotHaveHappened(); result.As <ViewResult>().Model.Should().BeEquivalentTo(model); controller.ModelState[nameof(EditCentreDetailsViewModel.CentreSignatureFile)].ValidationState.Should() .Be(ModelValidationState.Invalid); }