public void OpenCNAMExceptionContainsDetails() { try { OpenCNAM.Lookup(InvalidLookup); } catch (OpenCNAMException ex) { Assert.False(string.IsNullOrEmpty(ex.ServerResponse)); Assert.NotNull(ex.StatusCode); } }
public void ThrowsInvOpExceptionIfCredentialsArentSet() { Assert.Throws <InvalidOperationException>(() => { OpenCNAM.Lookup(ValidLookup, true); }); }
public void ThrowsOpenCNAMExceptionIfNotOk() { Assert.Throws <OpenCNAMException>(() => { OpenCNAM.Lookup(InvalidLookup); }); }
public void ReturnsAResponseOnValidLookup() { var response = OpenCNAM.Lookup(ValidLookup); Assert.False(string.IsNullOrEmpty(response)); }