예제 #1
0
        public void GetComponentFullName(Type type, string expected)
        {
            // Arrange & Act
            var result = ViewComponentConventions.GetComponentFullName(type.GetTypeInfo());

            // Assert
            Assert.Equal(expected, result);
        }
        private static ViewComponentDescriptor CreateDescriptor(TypeInfo typeInfo)
        {
            var candidate = new ViewComponentDescriptor
            {
                FullName   = ViewComponentConventions.GetComponentFullName(typeInfo),
                ShortName  = ViewComponentConventions.GetComponentName(typeInfo),
                TypeInfo   = typeInfo,
                MethodInfo = FindMethod(typeInfo.AsType())
            };

            return(candidate);
        }