コード例 #1
0
 public void OpenCNAMExceptionContainsDetails()
 {
     try
     {
         OpenCNAM.Lookup(InvalidLookup);
     }
     catch (OpenCNAMException ex)
     {
         Assert.False(string.IsNullOrEmpty(ex.ServerResponse));
         Assert.NotNull(ex.StatusCode);
     }
 }
コード例 #2
0
 public void ThrowsInvOpExceptionIfCredentialsArentSet()
 {
     Assert.Throws <InvalidOperationException>(() => { OpenCNAM.Lookup(ValidLookup, true); });
 }
コード例 #3
0
 public void ThrowsOpenCNAMExceptionIfNotOk()
 {
     Assert.Throws <OpenCNAMException>(() => { OpenCNAM.Lookup(InvalidLookup); });
 }
コード例 #4
0
        public void ReturnsAResponseOnValidLookup()
        {
            var response = OpenCNAM.Lookup(ValidLookup);

            Assert.False(string.IsNullOrEmpty(response));
        }