public void ShouldReturnHttpWebResponse() { //Arrange var defaultHttpRequester = new DefaultHttpRequester(); var webRequest = WebRequest.Create("https://www.google.fr"); //Act var response = defaultHttpRequester.GetResponse(webRequest); //Assert Assert.IsNotNull(response); }
public void ShouldThrowArgumentNullException() { //Arrange var defaultHttpRequester = new DefaultHttpRequester(); //Act var ex = Assert.ThrowsException <ArgumentNullException>(() => { defaultHttpRequester.GetResponse(null); }); //Assert Assert.AreEqual("request", ex.ParamName); }