public void Setup() { Given(VisualStudioSolution_exists); And("ViewModel is described", () => { mvvmSpecification = new ModelSpecification(); mvvmSpecification.AddViewModel(new ViewModel("Login")); }); And(ControllersConvention_is_created); When("apply Convention", () => convention.Apply(mvvmSpecification, mvvmFile)); }
public void Setup() { Given(VisualStudio_Solution_exists); And(Solution_has_a_UnitTest_Project); And("ViewModel is described", () => { mvvmDefinition = new ModelSpecification(); mvvmDefinition.AddViewModel(new ViewModel("Login")); }); And(UnitTestConvention_is_created); When("apply Convention", () => convention.Apply(mvvmDefinition, mvvmFile)); }
public void Setup() { Given(ViewsConvention_is_created); And(Solution_is_created); And("ViewModel is described", () => { mvvmDefinition = new ModelSpecification(); var loginViewModel = new ViewModel("Login"); loginViewModel.AddProperty(new ViewModelProperty("Username", "String", false)); loginViewModel.AddProperty(new ViewModelProperty("Password", "String", false)); loginViewModel.AddCommand(new ViewModelCommand("Login")); mvvmDefinition.AddViewModel(loginViewModel); }); When(ApplyConvention); }
public void Setup() { Given(VisualStudio_Solution_exists); And(Solution_has_a_UnitTest_Project); And("Project has a .mvvm file deep in the tree", () => { mvvmFile = project.NewFolder("Test").NewFolder("SubFolder").NewFolder("ViewModel").NewFile("viewmodel.mvvm"); }); And("ViewModel is described", () => { mvvmDefinition = new ModelSpecification(); mvvmDefinition.AddViewModel(new ViewModel("EditUserViewModel")); }); And(UnitTestConvention_is_created); When("apply Convention", () => convention.Apply(mvvmDefinition, mvvmFile)); }
public void Setup() { Given(ViewsConvention_is_created); And(Solution_is_created); And("Project has 'Views' folder and Views", () => { var viewsFolder = project.NewFolder("Views"); viewsFolder.NewFile("Login.xaml"); }); And("ViewModel is described", () => { mvvmDefinition = new ModelSpecification(); var loginViewModel = new ViewModel("Login"); loginViewModel.AddProperty(new ViewModelProperty("Username", "String", false)); loginViewModel.AddProperty(new ViewModelProperty("Password", "String", false)); loginViewModel.AddCommand(new ViewModelCommand("Login")); mvvmDefinition.AddViewModel(loginViewModel); }); When(ApplyConvention); }