Beispiel #1
0
        public void SerializeEmptyNumberField()
        {
            var serializer = new IntegerFieldSerializer <NumberField>();

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

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

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

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

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