public void MemberAttributeAnnotationReturnsSpecializedAnnotationsWhereApplicable(string attributeName, string annotationValue, AnnotationType expectedAnnotationType, string expectedValue = null) { var attributeValues = new List <string> { annotationValue }; var expectedValues = expectedValue != null ? new List <string> { expectedValue } : new List <string>(); var attributeAnnotationProvider = new AttributeAnnotationProvider(); var(actualAnnotationType, actualValues) = attributeAnnotationProvider.MemberAttributeAnnotation(attributeName, attributeValues); Assert.AreEqual(expectedAnnotationType, actualAnnotationType); AssertEqual(expectedValues, actualValues); }
public void FindModuleAnnotationForRandomAttributeReturnsModuleAttributeAnnotation() { var attributeName = "VB_Whatever"; var attributeValues = new List <string> { "SomeValue" }; var expectedAnnotationType = AnnotationType.ModuleAttribute; var expectedValues = new List <string> { "VB_Whatever", "SomeValue" }; var attributeAnnotationProvider = new AttributeAnnotationProvider(); var(actualAnnotationType, actualValues) = attributeAnnotationProvider.ModuleAttributeAnnotation(attributeName, attributeValues); Assert.AreEqual(expectedAnnotationType, actualAnnotationType); AssertEqual(expectedValues, actualValues); }