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