// ReSharper disable InconsistentNaming public void SortRecordsDesignerViewModel_Validate_ValidatesSingleRegion_NoErrors() // ReSharper restore InconsistentNaming { var modelItem = CreateModelItem(); modelItem.SetProperty("SelectedSort", "Backwards"); modelItem.SetProperty("SortField", "[[rec([[rec.b()]]).a]]"); var viewModel = new TestSortRecordsDesignerViewModel(modelItem); viewModel.Validate(); Assert.IsNull(viewModel.Errors); }
// ReSharper disable InconsistentNaming public void SortRecordsDesignerViewModel_Validate_ValidatesSingleRegion_ExpectErrors() // ReSharper restore InconsistentNaming { var modelItem = CreateModelItem(); modelItem.SetProperty("SelectedSort", "Backwards"); modelItem.SetProperty("SortField", "[[rec.a()]],[[rec.b()]]"); var viewModel = new TestSortRecordsDesignerViewModel(modelItem); viewModel.Validate(); Assert.AreEqual(1, viewModel.Errors.Count); }
public void SortRecordsDesignerViewModel_Validate_ValidatesSingleRegion_ExpectNoErrors() { var modelItem = CreateModelItem(); modelItem.SetProperty("SelectedSort", "Backwards"); modelItem.SetProperty("SortField", "[[rec().a]]"); var viewModel = new TestSortRecordsDesignerViewModel(modelItem); viewModel.Validate(); Assert.IsNull(viewModel.Errors); }
// ReSharper disable InconsistentNaming public void SortRecordsDesignerViewModel_Validate_ValidatesSingleRegion_ExpectErrors() // ReSharper restore InconsistentNaming { var modelItem = CreateModelItem(); modelItem.SetProperty("SelectedSort", "Backwards"); modelItem.SetProperty("SortField", "[[rec.a()]],[[rec.b()]]"); var viewModel = new TestSortRecordsDesignerViewModel(modelItem); viewModel.Validate(); Assert.AreEqual(1, viewModel.Errors.Count); }
// ReSharper disable InconsistentNaming public void SortRecordsDesignerViewModel_Validate_ValidatesSingleRegion_ExpectNoErrors() // ReSharper restore InconsistentNaming { var modelItem = CreateModelItem(); modelItem.SetProperty("SelectedSort", "Backwards"); modelItem.SetProperty("SortField","[[rec().a]]"); var viewModel = new TestSortRecordsDesignerViewModel(modelItem); viewModel.Validate(); Assert.IsNull(viewModel.Errors); }