public void UseOneLineSearchOption_WhenCalled_ShouldChangeMultilineModifier() { //Arrange verbEx.UseOneLineSearchOption(false); var regex = verbEx.ToRegex(); Assert.IsTrue(regex.Options.HasFlag(RegexOptions.Multiline), "RegexOptions should now be present"); //Act verbEx.UseOneLineSearchOption(true); //Assert regex = verbEx.ToRegex(); Assert.IsFalse(regex.Options.HasFlag(RegexOptions.Multiline), "RegexOptions should now have been removed"); }
public VerbalExpression SearchOneLine(bool enable) { if (enable) { RemoveModifier("m"); } else { AddModifier("m"); } _verbalExpression.UseOneLineSearchOption(enable); return(this); }