public void when_adding_annotation_then_state_equals_annotation() { var annotated = new AnnotatedObject(); var annotation = new FooAnnotation(); annotated.AddAnnotation(annotation); Assert.Same(annotation, annotated.AnnotationState); }
public void when_adding_two_annotations_then_can_retrieve_one() { var annotated = new AnnotatedObject(); var annotation = new FooAnnotation(); annotated.AddAnnotation(annotation); annotated.AddAnnotation(new BarAnnotation()); Assert.Same(annotation, annotated.Annotation<FooAnnotation>()); }