private void OnDeleteCustomViewportLayoutButtonClick(object sender, RoutedEventArgs e) { try { Logger.LogFuncUp(); var selectedItem = CustomViewportViewModel.SelectedViewportItem; if (selectedItem != null && this.tabItemUser.Visibility == Visibility.Visible && CustomViewportViewModel.CustomViewportItemCollectionUser.Contains(selectedItem)) { if (!selectedItem.Destroy()) { MessageBoxHandler.Instance.ShowWarning("UID_Filming_Warning_CannotDeleteConfigure", response => FilmingViewerContainee.Main.OnExitSecondaryUI()); customViewportListBoxOrigin.SelectedItem = null; return; } var selectIndex = CustomViewportViewModel.CustomViewportItemCollectionUser.IndexOf(selectedItem); CustomViewportViewModel.CustomViewportItemCollectionUser.Remove(selectedItem); CustomViewportViewModel.SelectedViewportItemUser = CustomViewportViewModel.CustomViewportItemCollectionUser.ElementAtOrDefault(selectIndex); CustomViewportViewModel.SelectedViewportItem = CustomViewportViewModel.SelectedViewportItemUser; CustomViewportViewModel.Refresh(); } } catch (Exception ex) { Logger.LogFuncException(ex.Message + ex.StackTrace); } }
public void RefreshTest() { CustomViewportViewModel target = new CustomViewportViewModel(); // target.Refresh(); //Assert.Inconclusive("A method that does not return a value cannot be verified."); }
public void IsEnableSaveTest() { CustomViewportViewModel target = new CustomViewportViewModel(); // bool actual; actual = target.IsEnableSave; //Assert.Inconclusive("Verify the correctness of this test method."); }
public void ExistViewportHasSameNameWithActiveViewportTest() { CustomViewportViewModel target = new CustomViewportViewModel(); // bool expected = false; // bool actual; actual = target.ExistViewportHasSameNameWithActiveViewport(); Assert.AreEqual(expected, actual); //Assert.Inconclusive("Verify the correctness of this test method."); }
public void CustomViewportNameTest() { CustomViewportViewModel target = new CustomViewportViewModel(); // string expected = string.Empty; // string actual; target.CustomViewportName = expected; actual = target.CustomViewportName; Assert.AreEqual(expected, actual); //Assert.Inconclusive("Verify the correctness of this test method."); }
public void SelectedViewportItemTest() { CustomViewportViewModel target = new CustomViewportViewModel(); // CustomViewportItem expected = null; // CustomViewportItem actual; target.SelectedViewportItem = expected; actual = target.SelectedViewportItem; //Assert.AreEqual(expected, actual); //Assert.Inconclusive("Verify the correctness of this test method."); }
public void CustomViewportItemCollectionTest() { CustomViewportViewModel target = new CustomViewportViewModel(); // ObservableCollection <CustomViewportItem> expected = null; // ObservableCollection <CustomViewportItem> actual; target.CustomViewportItemCollectionUser = expected; actual = target.CustomViewportItemCollectionUser; //Assert.AreEqual(expected, actual); //Assert.Inconclusive("Verify the correctness of this test method."); }
public void CustomViewportViewModelConstructorTest() { CustomViewportViewModel target = new CustomViewportViewModel(); //Assert.Inconclusive("TODO: Implement code to verify target"); }