Beispiel #1
0
        public void StringValueIsNumeric_ArgumentOutOfRangeException()
        {
            //Arrange
            var validator = new StringValueIsNumeric(null, "PropertyTest");
            //Act
            var result = validator.Process();

            //Assert
            Assert.AreEqual(result.StatusCode, StatusCode.Failed);
            Assert.IsTrue(!string.IsNullOrEmpty(result.StatusDetail));
        }
Beispiel #2
0
        public void StringValueIsNumeric_Success()
        {
            //Arrange
            var validator = new StringValueIsNumeric("1", "PropertyTest");
            //Act
            var result = validator.Process();

            //Assert
            Assert.AreEqual(result.StatusCode, StatusCode.Success);
            Assert.IsTrue(string.IsNullOrEmpty(result.StatusDetail));
        }