public async Task when_AddOrReplaceFileToTransaction_is_called_then_we_should_have_called_the_file_put_once() { using (HttpTest httpTest = new HttpTest()) { httpTest.RespondWith(200, string.Empty); var signhostApiClient = new SignHostApiClient(settings); using (Stream file = System.IO.File.Create("unittestdocument.pdf")) { await signhostApiClient.AddOrReplaceFileToTansaction(file, "transaction Id", "file Id"); } httpTest.ShouldHaveCalled($"{settings.Endpoint}transaction/*/file/*") .WithVerb(HttpMethod.Put) .WithContentType("application/pdf") .Times(1); } }