static void OnRecordsetNameValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { var viewModel = (RecordsLengthDesignerViewModel)d; var value = e.NewValue as string; if (!string.IsNullOrWhiteSpace(value)) { viewModel.RecordsetName = ActivityDesignerLanuageNotationConverter.ConvertToTopLevelRSNotation(value); } }
public void ActivityDesignerLanuageNotationConverter_ConverToTopLevelRSNotation_WhenStringScalar_AppendNotationRecordset() { //------------Execute Test--------------------------- var result = ActivityDesignerLanuageNotationConverter.ConvertToTopLevelRSNotation("abc"); //------------Assert Results------------------------- Assert.AreEqual("[[abc()]]", result); }
public void ActivityDesignerLanuageNotationConverter_ConverToTopLevelRSNotation_WhenStringRecordsetWithSingleOpenRegionAndStar_StarNotationRecordset() { //------------Execute Test--------------------------- var result = ActivityDesignerLanuageNotationConverter.ConvertToTopLevelRSNotation("abc(*"); //------------Assert Results------------------------- Assert.AreEqual("[[abc(*)]]", result); }
public void ActivityDesignerLanuageNotationConverter_ConverToTopLevelRSNotation_WhenStringEmpty_EmptyString() { //------------Execute Test--------------------------- var result = ActivityDesignerLanuageNotationConverter.ConvertToTopLevelRSNotation(string.Empty); //------------Assert Results------------------------- Assert.AreEqual(string.Empty, result); }