public void DsfWebActivityBase_PerformPut_Given_IsPutDataBase64_True_And_Base64String_Invalid_ShouldThrow() { //---------------Set up test pack------------------- var headers = new INameValue[] { new NameValue("Header1", "[[City]]") }; var address = "http://www.contoso.com/"; var sut = new TestDsfWebBaseActivity(WebRequestDataDto.CreateRequestDataDto(WebRequestMethod.Put, "Web Put Tool", "Web Put Tool")); //---------------Execute Test ---------------------- Assert.ThrowsException <Exception>(() => sut.TestPerformPut("teststringnotbase64", headers, new Mock <HttpClient>().Object, address, true)); //---------------Test Result ----------------------- }
public void DsfWebActivityBase_PerformPut_Given_IsPutDataBase64_False_And_Base64String_Valid_ShouldNotThrow1() { //---------------Set up test pack------------------- var headers = new INameValue[] { new NameValue("Header1", "[[City]]") }; var address = "http://www.contoso.com/"; var sut = new TestDsfWebBaseActivity(WebRequestDataDto.CreateRequestDataDto(WebRequestMethod.Put, "Web Put Tool", "Web Put Tool")); //---------------Execute Test ---------------------- var result = sut.TestPerformPut("THVja3kgRHViZQ==", headers, new Mock <HttpClient>().Object, address); //---------------Test Result ----------------------- Assert.IsNotNull(result); }