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