示例#1
0
        public void Dynamicly_maps_null_to_null()
        {
            Type1 type = null;

            Type3 mappedType = type.DynamicMap <Type3>();

            mappedType.Should().Be.Null();
        }
示例#2
0
        public void Maps_two_types_dynamicly()
        {
            var type = new Type1
            {
                Text = "Test"
            };

            var mappedType = type.DynamicMap <Type2>();

            mappedType.Should().Be.OfType <Type2>();
            mappedType.Text.Should().Be(type.Text);
        }
示例#3
0
        public void Does_not_map_or_throw_if_two_different_types_map_dynamicly()
        {
            var type = new Type1
            {
                Text = "Test"
            };

            var mappedType = type.DynamicMap <Type3>();

            mappedType.Should().Be.OfType <Type3>();
            mappedType.Number.Should().Be(0);
        }