public void VerifyCustomerParametersConstructsCorrectObjectForSite16384() { // Arrange // Act var result = new VerifyCustomerParameters("16384", string.Empty, string.Empty); // Assert Assert.IsNotNull(result); Assert.AreEqual(16384, result.SiteId); }
public void VerifyCustomerParametersThrowsCorrectExceptionWithOutOfRangeSiteId() { // Act Exception caughtException = null; try { var result = new VerifyCustomerParameters("5150", string.Empty, string.Empty); } catch (Exception ex) { caughtException = ex; } // Assert Assert.IsNotNull(caughtException); Assert.IsInstanceOfType(caughtException, typeof(InvalidSiteException)); }
public void VerifyCustomerParametersThrowsCorrectExceptionWithNonNumericSiteId() { // Act Exception caughtException = null; try { var result = new VerifyCustomerParameters("i-am-not-a-number-i-am-a-free-man", string.Empty, string.Empty); } catch (Exception ex) { caughtException = ex; } // Assert Assert.IsNotNull(caughtException); Assert.IsInstanceOfType(caughtException, typeof(InvalidSiteException)); }