Ejemplo n.º 1
0
        public void RemoveAnnotation_KeyExists()
        {
            var annotatable = new AnnotatableObject();
            var key         = new AnnotationKey <int>();

            annotatable.SetAnnotation(key, 10);

            Assert.True(annotatable.RemoveAnnotation(key));
        }
Ejemplo n.º 2
0
        public void SetAnnotation_GetAnnotation()
        {
            var annotatable = new AnnotatableObject();
            var key         = new AnnotationKey <int>();

            annotatable.SetAnnotation(key, 10);

            Assert.Equal(10, annotatable.GetAnnotation(key));
        }