public void GenericClassDefinitionFullName()
        {
            var extractor = new TypeNameExtractor();

            extractor.GetName(typeof(IList <>), true).Should().Be("System.Collections.Generic.IList<T>");

            CollectionAssert.AreEquivalent(new[] {
                typeof(IList <>).Namespace
            }, extractor.Namespaces.ToArray());
        }
        public void GenericClassDefinitionTwoName()
        {
            var extractor = new TypeNameExtractor();

            extractor.GetName(typeof(IDictionary <,>)).Should().Be("IDictionary<TKey, TValue>");

            CollectionAssert.AreEquivalent(new[] {
                typeof(IDictionary <,>).Namespace,
            }, extractor.Namespaces.ToArray());
        }
        public void CanReturnLowercaseFullNameForVoidType()
        {
            var extractor = new TypeNameExtractor();

            extractor.GetName(typeof(void), true).Should().Be("void");

            CollectionAssert.AreEquivalent(new[] {
                typeof(void).Namespace,
            }, extractor.Namespaces.ToArray());
        }
        public void NormalClassDefinitionFullName()
        {
            var extractor = new TypeNameExtractor();

            extractor.GetName(typeof(TypeNameExtractorFixture), true).Should().Be(typeof(TypeNameExtractorFixture).FullName);

            CollectionAssert.AreEquivalent(new[] {
                typeof(TypeNameExtractorFixture).Namespace
            }, extractor.Namespaces.ToArray());
        }
        public void GenericClassName()
        {
            var extractor = new TypeNameExtractor();

            extractor.GetName(typeof(IList <int>)).Should().Be("IList<Int32>");

            CollectionAssert.AreEquivalent(new[] {
                typeof(IList <>).Namespace,
                typeof(Int32).Namespace
            }, extractor.Namespaces.ToArray());
        }
        public void GenericClassInsideNonGenericInsideGenericClassFullName()
        {
            var extractor = new TypeNameExtractor();

            extractor.GetName(typeof(Test <,> .NonGeneric.Generic <,>), true).Should().Be(
                "Simple.Tests.Reflection.TypeNameExtractorFixture.Test<A, B>.NonGeneric.Generic<C, D>");

            CollectionAssert.AreEquivalent(new[] {
                typeof(TypeNameExtractorFixture).Namespace,
            }, extractor.Namespaces.ToArray());
        }
        public void GenericClassInsideNonGenericInsideGenericClassName()
        {
            var extractor = new TypeNameExtractor();

            Assert.AreEqual("TypeNameExtractorFixture.Test<A, B>.NonGeneric.Generic<C, D>",
                            extractor.GetName(typeof(Test <,> .NonGeneric.Generic <,>)));

            CollectionAssert.AreEquivalent(new[] {
                typeof(TypeNameExtractorFixture).Namespace,
            }, extractor.Namespaces.ToArray());
        }
        public void GenericClassTwoName()
        {
            var extractor = new TypeNameExtractor();

            extractor.GetName(typeof(IDictionary <string, int>)).Should().Be("IDictionary<String, Int32>");

            CollectionAssert.AreEquivalent(new[] {
                typeof(IDictionary <,>).Namespace,
                typeof(string).Namespace
            }, extractor.Namespaces.ToArray());
        }
        public void GenericClassFullName()
        {
            var extractor = new TypeNameExtractor();

            Assert.AreEqual("System.Collections.Generic.IList<System.Int32>",
                            extractor.GetName(typeof(IList <int>), true));

            CollectionAssert.AreEquivalent(new[] {
                typeof(IList <>).Namespace,
                typeof(Int32).Namespace
            }, extractor.Namespaces.ToArray());
        }
        public void GenericClassAsGenericParameter()
        {
            var extractor = new TypeNameExtractor();

            Assert.AreEqual("IDictionary<IList<Int32>, IList<String>>",
                            extractor.GetName(typeof(IDictionary <IList <int>, IList <string> >)));

            CollectionAssert.AreEquivalent(new[] {
                typeof(IDictionary <,>).Namespace,
                typeof(string).Namespace
            }, extractor.Namespaces.ToArray());
        }
        public void GenericClassInnerFullName()
        {
            var extractor = new TypeNameExtractor();

            Assert.AreEqual("System.Collections.Generic.Dictionary<System.String, System.Int32>.Enumerator",
                            extractor.GetName(typeof(Dictionary <string, int> .Enumerator), true));

            CollectionAssert.AreEquivalent(new[] {
                typeof(IDictionary <,>).Namespace,
                typeof(string).Namespace
            }, extractor.Namespaces.ToArray());
        }