public void Apply_SameInstance() { var a = new AnnotationA { }; var set = AnnotationSet(a, a); Assert.That(set, HasAnnotations(a)); }
public void Apply_AnotherType_ThenSameType() { var a1 = new AnnotationA { }; var b1 = new AnnotationB { }; var a2 = new AnnotationA { }; var set = AnnotationSet(a1, b1, a2); Assert.That(set, HasAnnotations(a2, b1)); }
public void Apply_AnotherType_ThenSameType_AllowMultiple() { var a1 = new AnnotationA { AllowMultiple = true }; var b1 = new AnnotationB { AllowMultiple = true }; var a2 = new AnnotationA { AllowMultiple = true }; var set = AnnotationSet(a1, b1, a2); Assert.That(set, HasAnnotations(a2, b1, a1)); }
public void Apply_AnotherType_ThenSameInstance_AllowMultiple() { var a = new AnnotationA { AllowMultiple = true }; var b = new AnnotationB { AllowMultiple = true }; var set = AnnotationSet(a, b, a); // NOTE: Unlike BehaviorSet, adding same instance to AnnotationSet does NOT reorder items Assert.That(set, HasAnnotations(b, a)); }
public void Apply_SameInstance_AllowMultiple() { var a = new AnnotationA { AllowMultiple = true }; var set = AnnotationSet(a, a); Assert.That(set, HasAnnotations(a)); }