public void Replace_Origin_With_Moto( string origin, string findWith, string replaceWith, string expected, bool isMatchCase, bool isMatchWholeWord, bool shouldBeTrue) { // arrange var @params = new FindReplaceParams { FindWith = findWith, ReplaceWith = replaceWith, IsMatchCase = isMatchCase, IsMatchWholeWord = isMatchWholeWord }; // act var result = _findReplaceTool.Replace(origin, @params).Line; // assert if (shouldBeTrue) { result.Should().Be(expected); } else { result.Should().NotBe(expected); } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var model = new FindReplaceParams { FindWith = "Find test", ReplaceWith = "Replace test", IsMatchCase = true, IsUseRegex = true }; var control = new FindReplaceControl(); control.SetModel(model); var form = FormTools.GetFormForControl(control); form.ShowDialog(); var @params = control.GetModel(); //Application.Run(new Main()); }
public void SetModel(FindReplaceParams model) { PropertyMapper.MapProperties(model, Model); }