public void GtfCapabilitiesNamesAreAttributedCorrectly() { // Just one is enough. Assert.AreEqual(".Selectable", Capabilities.Selectable.Name); Assert.AreEqual(Capabilities.Selectable, Capabilities.Get(".Selectable")); }
public void GetFeatureOptionsReturnsEmptyIfFeatureNotFound() { var pc = new Capabilities( new Feature(Exp.SomeFeature, new Option(Exp.SomeOption1), new Option(Exp.SomeOption2))); var options = pc.Get(Exp.OtherFeature); Assert.Null(options); }
public void GetFeatureOptionsReturnsEmptyIfFeatureNotFound() { var pc = new Capabilities( new Feature(Exp.SomeFeature, new Option(Exp.SomeOption1), new Option(Exp.SomeOption2))); var options = pc.Get(Exp.OtherFeature); Assert.Null(options); }
public void GetFeatureOptionsReturnsOptions() { var pc = new Capabilities( new Feature(Exp.SomeFeature, new Option(Exp.SomeOption1), new Option(Exp.SomeOption2))); var options = pc.Get(Exp.SomeFeature)?.Options(); var expected = new List <XName>() { Exp.SomeOption1, Exp.SomeOption2 }; Assert.Equal(expected, options.Select(x => x.Name)); }
public void GetNestedFeatureOptionsReturnsOptions() { var pc = new Capabilities( new Feature(Exp.SomeFeature, new Feature(Exp.NestedFeature, new Option(Exp.SomeOption1), new Option(Exp.SomeOption2)))); var options = pc.Get(Exp.SomeFeature, Exp.NestedFeature)?.Options(); var expected = new List<XName>() { Exp.SomeOption1, Exp.SomeOption2 }; Assert.Equal(expected, options.Select(x => x.Name)); }