public void Nested_Style_Without_Nesting_Operator_Throws() { var parent = new Style(x => x.OfType<Class1>()); var nested = new Style(x => x.Class("foo")); Assert.Throws<InvalidOperationException>(() => parent.Children.Add(nested)); }