Exemple #1
0
        public void Read_GenericMethodsWithConstraints()
        {
            // Arrange
            var apiTypeReader = new ApiTypeReader();

            (Type type, CompilationUnitExpectation expectation) = ExpectedTypes.GenericMethodsWithConstraints;

            // Assert
            ReadExpectation(apiTypeReader, type, expectation);
        }
Exemple #2
0
        public void Read_IndexerProperties()
        {
            // Arrange
            var apiTypeReader = new ApiTypeReader();

            (Type type, CompilationUnitExpectation expectation) = ExpectedTypes.IndexerProperties;

            // Assert
            ReadExpectation(apiTypeReader, type, expectation);
        }
Exemple #3
0
        public void Read_SimpleMethods()
        {
            // Arrange
            var apiTypeReader = new ApiTypeReader();

            (Type type, CompilationUnitExpectation expectation) = ExpectedTypes.SimpleMethods;

            // Assert
            ReadExpectation(apiTypeReader, type, expectation);
        }
Exemple #4
0
        public void Read_EmptyClass()
        {
            // Arrange
            var apiTypeReader = new ApiTypeReader();

            (Type type, CompilationUnitExpectation expectation) = ExpectedTypes.EmptyClass;

            // Assert
            ReadExpectation(apiTypeReader, type, expectation);
        }
Exemple #5
0
        public static void ReadExpectation(ApiTypeReader typeReader, Type type, CompilationUnitExpectation expectation)
        {
            var typeNameResolver = new TypeNameResolver
            {
                SimplifyNamespaces = true,
            };

            // Act
            var compilationUnit = typeReader.ReadCompilationUnit(type, typeNameResolver);

            // Assert
            AssertCompilationUnit(expectation, compilationUnit);
        }