private void CreateNewProject_OnClick(object sender, RoutedEventArgs e) { string selectedLanguage = "C#"; // Currently, only support C# OutputLanguage outputLanguage = _projectEditorViewModel.OutputLanguages.First(ol => ol.Name == selectedLanguage); _projectEditorViewModel.StartNewProject(outputLanguage); }
private static ProjectEditorViewModel CreateCSharpProjectEditorViewModel() { ProjectEditorViewModel vm = new ProjectEditorViewModel(); vm.StartNewProject(OutputLanguageFactory.GetLanguages().First(x => x.Name == "C#")); return(vm); }
public void Test_StartNewProject() { ProjectEditorViewModel vm = new ProjectEditorViewModel(); OutputLanguage outputLanguage = vm.OutputLanguages.First(ol => ol.Name == "C#"); vm.StartNewProject(outputLanguage); // Assertions vm.CurrentProject.ShouldNotBeNull(); vm.CurrentProject.Datatypes.Count.ShouldBe(17); }