コード例 #1
0
        public void VerifyCustomerParametersConstructsCorrectObjectForSite16384()
        {
            // Arrange
            // Act
            var result = new VerifyCustomerParameters("16384", string.Empty, string.Empty);

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual(16384, result.SiteId);
        }
コード例 #2
0
        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));
        }
コード例 #3
0
        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));
        }