public void OneTimeSetUp()
        {
            applicationPatcherWpfConfiguration = new ApplicationPatcherWpfConfiguration {
                CommandFieldNameRules = new Configurations.NameRules {
                    Suffix = "Command", Type = NameRulesType.lowerCamelCase
                },
                CommandPropertyNameRules = new Configurations.NameRules {
                    Suffix = "Command", Type = NameRulesType.UpperCamelCase
                },
                CommandExecuteMethodNameRules = new Configurations.NameRules {
                    Prefix = "Execute", Suffix = "Method", Type = NameRulesType.UpperCamelCase
                },
                CommandCanExecuteMethodNameRules = new Configurations.NameRules {
                    Prefix = "CanExecute", Suffix = "Method", Type = NameRulesType.UpperCamelCase
                }
            };

            var nameRulesService = NameRulesServiceHelper.CreateService(applicationPatcherWpfConfiguration);

            commandGrouperService = new CommandGrouperService(applicationPatcherWpfConfiguration, nameRulesService);

            CommandType  = FakeCommonTypeBuilder.Create(KnownTypeNames.ICommand).Build();
            RelayCommand = FakeCommonTypeBuilder.Create(KnownTypeNames.RelayCommand, CommandType).Build();
            fakeCommonAssemblyBuilder = FakeCommonAssemblyBuilder.Create().AddCommonType(CommandType, false).AddCommonType(RelayCommand, false);
            FakeCommonTypeBuilder.ClearCreatedTypes();
        }
示例#2
0
        public void OneTimeSetUp()
        {
            var applicationPatcherWpfConfiguration = new ApplicationPatcherWpfConfiguration {
                FieldNameRules = new Configurations.NameRules {
                    Type = NameRulesType.lowerCamelCase
                },
                PropertyNameRules = new Configurations.NameRules {
                    Type = NameRulesType.UpperCamelCase
                },
                CommandFieldNameRules = new Configurations.NameRules {
                    Suffix = "Command", Type = NameRulesType.lowerCamelCase
                },
                CommandPropertyNameRules = new Configurations.NameRules {
                    Suffix = "Command", Type = NameRulesType.UpperCamelCase
                },
                DependencyFieldNameRules = new Configurations.NameRules {
                    Suffix = "Property", Type = NameRulesType.UpperCamelCase
                },
                DependencyPropertyNameRules = new Configurations.NameRules {
                    Type = NameRulesType.UpperCamelCase
                },
                CommandExecuteMethodNameRules = new Configurations.NameRules {
                    Prefix = "Execute", Suffix = "Method", Type = NameRulesType.UpperCamelCase
                },
                CommandCanExecuteMethodNameRules = new Configurations.NameRules {
                    Prefix = "CanExecute", Suffix = "Method", Type = NameRulesType.UpperCamelCase
                }
            };

            nameRulesService = NameRulesServiceHelper.CreateService(applicationPatcherWpfConfiguration);
        }
示例#3
0
        public void OneTimeSetUp()
        {
            applicationPatcherWpfConfiguration = new ApplicationPatcherWpfConfiguration {
                DependencyFieldNameRules = new Configurations.NameRules {
                    Suffix = "Property", Type = NameRulesType.UpperCamelCase
                },
                DependencyPropertyNameRules = new Configurations.NameRules {
                    Type = NameRulesType.UpperCamelCase
                }
            };

            var nameRulesService = NameRulesServiceHelper.CreateService(applicationPatcherWpfConfiguration);

            dependencyGrouperService = new DependencyGrouperService(applicationPatcherWpfConfiguration, nameRulesService);

            DependencyPropertyType    = FakeCommonTypeBuilder.Create(KnownTypeNames.DependencyProperty).Build();
            fakeCommonAssemblyBuilder = FakeCommonAssemblyBuilder.Create().AddCommonType(DependencyPropertyType, false);
            FakeCommonTypeBuilder.ClearCreatedTypes();
        }
        public void OneTimeSetUp()
        {
            applicationPatcherWpfConfiguration = new ApplicationPatcherWpfConfiguration {
                FieldNameRules = new Configurations.NameRules {
                    Type = NameRulesType.lowerCamelCase
                },
                PropertyNameRules = new Configurations.NameRules {
                    Type = NameRulesType.UpperCamelCase
                }
            };

            var nameRulesService = NameRulesServiceHelper.CreateService(applicationPatcherWpfConfiguration);

            propertyGrouperService = new PropertyGrouperService(applicationPatcherWpfConfiguration, nameRulesService);

            CommandType = FakeCommonTypeBuilder.Create(KnownTypeNames.ICommand).Build();
            fakeCommonAssemblyBuilder = FakeCommonAssemblyBuilder.Create().AddCommonType(CommandType, false);
            FakeCommonTypeBuilder.ClearCreatedTypes();
        }