Esempio n. 1
0
        public void GetProperty_InvalidStringValue_ReturnsInvalid(string stringValue)
        {
            var item = new UriMapper();

            object value = 1;
            PropertyMapperResultType result = item.GetProperty(new ReadCellValueResult(-1, stringValue), ref value);

            Assert.Equal(PropertyMapperResultType.Invalid, result);
            Assert.Equal(1, value);
        }
Esempio n. 2
0
        public void GetProperty_ValidStringValue_ReturnsSuccess(string stringValue, Uri expected)
        {
            var item = new UriMapper();

            object value = null;
            PropertyMapperResultType result = item.GetProperty(new ReadCellValueResult(-1, stringValue), ref value);

            Assert.Equal(PropertyMapperResultType.Success, result);
            Assert.Equal(expected, value);
        }