Created
October 19, 2012 23:38
-
-
Save dtchepak/3921307 to your computer and use it in GitHub Desktop.
ShouldNotReturnNullWebServiceResponse
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public void ShouldNotReturnNullWebServiceResponse() | |
{ | |
var iv_client = Substitute.For<Client>(); | |
iv_client.GetValuation("G1|12345", 10000, 2008, "08").Returns(new WebServiceResponse() | |
{ | |
Result = false, | |
ErrorEnum = IdResponseCode.NoDataFound | |
}); | |
Assert.NotNull(iv_client.GetValuation("G1|12345", 10000, 2008, "08")); | |
} | |
public interface Client { WebServiceResponse GetValuation(string g1, int i, int i1, string s); } | |
public enum IdResponseCode { NoDataFound, } | |
public class WebServiceResponse | |
{ | |
public bool Result { get; set; } | |
public IdResponseCode ErrorEnum { get; set; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment