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