Exemplo n.º 1
0
        public void Should_Create_Constructor_For_GetOnlyProperties()
        {
            var generatorFixture = new SmartCodeGeneratorFixture(typeof(OnBuildImmutableConstructorGenerator), new[]
            {
                ReferenceSource.FromType <ImmutableConstructorAttribute>()
            });

            generatorFixture.AssertGeneratedCode(GetOnlyProperties, GetOnlyProperties_Transformed, _ignoreGeneratorVersionPattern);
        }
Exemplo n.º 2
0
        public void should_be_able_to_generate_mapping_interface_implementation_using_custom_mappers()
        {
            var generatorFixture = new SmartCodeGeneratorFixture(typeof(OnBuildMappingGenerator), new[]
            {
                ReferenceSource.FromType <MappingInterface>()
            });


            generatorFixture.AssertGeneratedCode(_003_ExternalTypeMappers, _003_ExternalTypeMappers_TRANSFORMED, IgnoreGeneratorVersionPattern);
        }
Exemplo n.º 3
0
        public void should_be_able_to_generate_mapping_interface_implementation()
        {
            var generatorFixture = new SmartCodeGeneratorFixture(typeof(OnBuildMappingGenerator), new[]
            {
                ReferenceSource.FromType <MappingInterface>(),
                ReferenceSource.FromType(typeof(ImmutableArray <>)),
            });


            generatorFixture.AssertGeneratedCode(_001_SimpleMappingInterface, _001_SimpleMappingInterface_TRANSFORMED, IgnoreGeneratorVersionPattern);
        }