Exemplo n.º 1
0
 private void UserControl_Loaded(object sender, System.Windows.RoutedEventArgs e)
 {
     myProjectInfoViewModel = DataContext as ProjectInfoViewModel;
     if (myProjectInfoViewModel != null)
     {
         myProjectInfoViewModel.LatestBuild.PropertyChanged +=
             LatestBuildViewModel_PropertyChanged;
         if (firstTimeLoad)
         {
             BuildStatusUpdate();
         }
     }
     firstTimeLoad = false;
 }
Exemplo n.º 2
0
        public void Assure_status_is_updated_when_data_is_added_to_civiewmodel()
        {
            Scenario.StartNew(this, scenario =>
            {
                scenario.Given(the_object_is_created_without_data);

                scenario.When("data is added to the civiewmodel");

                scenario.Then("status should change from successfull to the new projects buildstatus", () =>
                {
                    viewModel.Status.ShouldBe(BuildStatus.Unknown);
                    
                    var projectInfoViewModel = new ProjectInfoViewModel();
                    var buildViewModel = new BuildViewModel();
                    buildViewModel.Status = BuildStatus.Building;
                    projectInfoViewModel.LatestBuild = buildViewModel;
                    ciViewModel.Data.Add(projectInfoViewModel);

                    viewModel.Status.ShouldBe(BuildStatus.Building);
                });
            });
        }
Exemplo n.º 3
0
 public void SetUp()
 {
     viewModel = new ProjectInfoViewModel();
 }