public void ValidateSortRules_ValidIcuRules_IsTrue() { string message; _model.AddNew(); _model.CurrentIso = "pt"; _model.CurrentCollationRulesType = "CustomIcu"; _model.CurrentCollationRules = "&b<a<c"; Assert.IsTrue(_model.ValidateCurrentSortRules(out message)); }
public void ValidateSortRules_ValidIcuRules_IsTrue() { string message; _model.AddNew(); _model.CurrentISO = "pt"; _model.CurrentSortUsing = WritingSystemDefinition.SortRulesType.CustomICU.ToString(); _model.CurrentSortRules = "&b<a<c"; Assert.IsTrue(_model.ValidateCurrentSortRules(out message)); }
private bool ValidateSortRules() { string message; const string prefixToMessage = "SORT RULES WILL NOT BE SAVED\r\n"; if (!_model.ValidateCurrentSortRules(out message)) { _testSortResult.Text = prefixToMessage + (message ?? String.Empty); _testSortResult.ForeColor = Color.Red; return(false); } if (_testSortResult.Text.StartsWith(prefixToMessage)) { _testSortResult.Text = String.Empty; _testSortResult.ForeColor = Color.Black; } return(true); }