Пример #1
0
        public void Type_Value_Test()
        {
            var typeValue = new TypeTypeValue(new TypeDescriptor
            {
                Name = "Строка",
                ID   = 1899
            });

            Assert.True(typeValue.DataType == DataType.Type);
            Assert.True(typeValue.AsString() == "Строка");

            Assert.Throws <RuntimeException>(() => typeValue.AsNumber());
            Assert.Throws <RuntimeException>(() => typeValue.AsBoolean());
            Assert.Throws <RuntimeException>(() => typeValue.AsObject());
            Assert.Throws <RuntimeException>(() => typeValue.AsDate());
        }