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(); }
public ViewModelCommandGroupsPatcher(CommandGrouperService commandGrouperService, NameRulesService nameRulesService) { this.commandGrouperService = commandGrouperService; this.nameRulesService = nameRulesService; log = Log.For(this); }