public void ConditionalSelectorBuilderWontAllowMultipleWhensWithoutInterleavingThens() { Assert.Throws <InvalidOperationException>(() => { ElementSelectors.IConditionalSelectorBuilder b = ElementSelectors.ConditionalBuilder(); b.When(x => x != null); b.WhenElementIsNamed(new XmlQualifiedName("foo")); }); }
public void ConditionalSelectorBuilderWontAllowWhensWithoutThens() { Assert.Throws <InvalidOperationException>(() => { ElementSelectors.IConditionalSelectorBuilder b = ElementSelectors.ConditionalBuilder(); b.When(x => x != null); b.Build(); }); }