public void ValidationContext_With_WorksCorrectly() { var options = ValidationOptions.Default; var context = new ValidationContext<string>(null); context.With(null); Assert.AreEqual(context.Options.CascadeBehavior, options.CascadeBehavior); Assert.AreEqual(context.Options.ReportingBehavior, options.ReportingBehavior); context.With(new ValidationOptions { CascadeBehavior = CascadeMode.Continue }); Assert.AreEqual(context.Options.CascadeBehavior, CascadeMode.Continue); }