Esempio n. 1
0
        public void SerializeEmptyNumberField()
        {
            var serializer = new IntegerFieldSerializer <NumberField>();

            var str = serializer.Serialize(new NumberField());

            Assert.Null(str);
        }
Esempio n. 2
0
        public void WrongInputToNumberField()
        {
            var serializer = new IntegerFieldSerializer <NumberField>();

            Assert.Throws <ArgumentException>(() => serializer.Serialize(new StringField
            {
                Value = "Exception"
            }));
        }
Esempio n. 3
0
        public void SerializeNumberField()
        {
            var serializer = new IntegerFieldSerializer <NumberField>();

            var str = serializer.Serialize(new NumberField
            {
                Value = 25
            });

            Assert.Equal("25", str);
        }