public void GetTraitOptions_ViaAttributeUsage() { var source = new FakeAttribute(); var expected = new TraitOptions { ValidOn = AttributeTargets.Property, AllowMultiple = true, Inherited = false }; AssertTraitOptions(source, expected); }
public void GetTraitOptions_Default() { var source = new object(); var expected = new TraitOptions { ValidOn = AttributeTargets.All, AllowMultiple = false, Inherited = true }; AssertTraitOptions(source, expected); }
public void GetTraitOptions_ViaInterface_OverridingAttributeUsage() { var source = new MockAnnotationAttribute { ValidOn = AttributeTargets.Interface, AllowMultiple = true, Inherited = false }; var expected = new TraitOptions { ValidOn = AttributeTargets.Interface, AllowMultiple = true, Inherited = false }; AssertTraitOptions(source, expected); }