public async Task when_a_GetTransaction_is_called_then_we_should_have_called_the_transaction_get_once()
		{
			using (HttpTest httpTest = new HttpTest()) {
				httpTest.RespondWith(200, APIResponses.GetTransaction);

				var signhostApiClient = new SignHostApiClient(settings);

				var result = await signhostApiClient.GetTransaction("transaction Id");
				result.Id.Should().Be("c487be92-0255-40c7-bd7d-20805a65e7d9");

				httpTest.ShouldHaveCalled($"{settings.Endpoint}transaction/*")
					.WithVerb(HttpMethod.Get)
					.Times(1);
			}
		}
		public void when_GetDocument_is_called_then_we_should_have_called_the_file_get_once()
		{
			using (HttpTest httpTest = new HttpTest()) {
				httpTest.RespondWith(200, string.Empty);

				var signhostApiClient = new SignHostApiClient(settings);

				var document = signhostApiClient.GetDocument("transaction Id", "file Id");

				httpTest.ShouldHaveCalled($"{settings.Endpoint}transaction/*/file/*")
					.WithVerb(HttpMethod.Get)
					.Times(1);
			}
		}
		public void when_StartTransaction_is_called_then_we_should_have_called_the_transaction_put_once()
		{
			using (HttpTest httpTest = new HttpTest()) {
				httpTest.RespondWith(200, string.Empty);

				var signhostApiClient = new SignHostApiClient(settings);

				signhostApiClient.StartTransaction("transaction Id");

				httpTest.ShouldHaveCalled($"{settings.Endpoint}transaction/*/start")
					.WithVerb(HttpMethod.Put)
					.Times(1);
			}
		}
		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);
			}
		}
		public void when_a_DeleteTransaction_is_called_then_we_should_have_called_the_transaction_delete_once()
		{
			using (HttpTest httpTest = new HttpTest()) {
				httpTest.RespondWith(200, APIResponses.DeleteTransaction);

				var signhostApiClient = new SignHostApiClient(settings);

				signhostApiClient.DeleteTransaction("transaction Id");

				httpTest.ShouldHaveCalled($"{settings.Endpoint}transaction/*")
					.WithVerb(HttpMethod.Delete)
					.Times(1);
			}
		}
		public void when_CreateTransaction_is_called_with_invalid_email_then_we_should_get_a_BadRequestException()
		{
			using (HttpTest httpTest = new HttpTest())
			{
				httpTest.RespondWithJson(400, new { message = "Bad Request" });

				var signhostApiClient = new SignHostApiClient(settings);

				Signer testSigner = new Signer();
				testSigner.Email = "firstname.lastnamegmail.com";

				Transaction testTransaction = new Transaction();
				testTransaction.Signers.Add(testSigner);

				Func<Task> getTransaction = () => signhostApiClient.CreateTransaction(testTransaction);
				getTransaction.ShouldThrow<ErrorHandling.BadRequestException>();

				httpTest.ShouldHaveCalled($"{settings.Endpoint}transaction")
					.WithVerb(HttpMethod.Post)
					.WithContentType("application/json")
					.Times(1);
			}
		}
		public async Task when_a_CreateTransaction_is_called_then_we_should_have_called_the_transaction_Post_once()
		{
			using (HttpTest httpTest = new HttpTest()) {
				httpTest.RespondWith(200, APIResponses.AddTransaction);

				var signhostApiClient = new SignHostApiClient(settings);

				Signer testSigner = new Signer();
				testSigner.Email = "*****@*****.**";

				Transaction testTransaction = new Transaction();
				testTransaction.Signers.Add(testSigner);

				var result = await signhostApiClient.CreateTransaction(testTransaction);
				result.Id.Should().Be("c487be92-0255-40c7-bd7d-20805a65e7d9");

				httpTest.ShouldHaveCalled($"{settings.Endpoint}transaction")
					.WithVerb(HttpMethod.Post)
					.WithContentType("application/json")
					.Times(1);
			}
		}