Exemple #1
0
        public void WhenValueIsValidString_ThenProduceTinyType()
        {
            var validString    = "Valid String";
            var tc             = new TinyTypeTypeConverter <ServerTaskId>();
            var result         = tc.ConvertFrom(validString) as ServerTaskId;
            var expectedResult = CaseInsensitiveTinyType.Create <ServerTaskId>(validString);

            Assert.AreEqual(expectedResult, result);
        }
Exemple #2
0
        public void WhenValueIsNonString_ThenThrowException()
        {
            var tc = new TinyTypeTypeConverter <ServerTaskId>();

            Assert.Throws <Exception>(() => tc.ConvertFrom(1));
        }
Exemple #3
0
        public void WhenValueIsNull_ThenThrowException()
        {
            var tc = new TinyTypeTypeConverter <ServerTaskId>();

            Assert.Throws <ArgumentNullException>(() => tc.ConvertFrom(null));
        }