예제 #1
0
        public void Does_enumintconversion_translate()
        {
            var conversion = new EnumConversion {
                Color = Color.Green
            };
            var conversionDto = conversion.ConvertTo <EnumConversionIntDto>();

            Assert.That(conversionDto.Color, Is.EqualTo(1));
        }
예제 #2
0
        public void Does_enumstringconversion_translate()
        {
            var conversion = new EnumConversion {
                Color = Color.Blue
            };
            var conversionDto = conversion.ConvertTo <EnumConversionStringDto>();

            Assert.That(conversionDto.Color, Is.EqualTo("Blue"));
        }
예제 #3
0
        public void Does_convert_to_EnumConversionString()
        {
            var conversion = new EnumConversion
            {
                Color         = Color.Green,
                NullableColor = Color.Green,
            };
            var conversionDto = conversion.ConvertTo <EnumConversionString>();

            Assert.That(conversionDto.Color, Is.EqualTo("Green"));
            Assert.That(conversionDto.NullableColor, Is.EqualTo("Green"));
        }
예제 #4
0
        public void Does_enumintconversion_translate()
        {
            var conversion = new EnumConversion { Color = Color.Green };
            var conversionDto = conversion.ConvertTo<EnumConversionIntDto>();

            Assert.That(conversionDto.Color, Is.EqualTo(1));
        }
예제 #5
0
        public void Does_enumstringconversion_translate()
        {
            var conversion = new EnumConversion { Color = Color.Blue };
            var conversionDto = conversion.ConvertTo<EnumConversionStringDto>();

            Assert.That(conversionDto.Color, Is.EqualTo("Blue"));
        }