상속: ITupleSerializerInitializerProxy
        public void Configure_TestAssembly_ConfiguresAllTuples()
        {
            var proxyFake = new TupleSerializerInitializerProxyFake();

            new TupleSerializerConfigurator { JsConfigProxy = proxyFake }
                .WithAssemblies(new[] { Assembly.GetExecutingAssembly() })
                .Configure();

            Assert.Equal(9, proxyFake.ConfigedTypes.Count);
        }
        public void Configure_TestAssembly_ConfiguresAllTuples()
        {
            var proxyFake = new TupleSerializerInitializerProxyFake();

            new TupleSerializerConfigurator {
                JsConfigProxy = proxyFake
            }
            .WithAssemblies(new[] { Assembly.GetExecutingAssembly() })
            .Configure();

            Assert.Equal(9, proxyFake.ConfigedTypes.Count);
        }
        public void Configure_TestAssemblyFilteredByEmptyNamespace_ConfiguresTuplesWithoutANamespace()
        {
            var proxyFake = new TupleSerializerInitializerProxyFake();

            new TupleSerializerConfigurator { JsConfigProxy = proxyFake }
                .WithAssemblies(new[] { Assembly.GetExecutingAssembly() })
                .WithNamespaceFilter(s => s.Equals(string.Empty, StringComparison.OrdinalIgnoreCase))
                .Configure();

            Assert.Equal(2, proxyFake.ConfigedTypes.Count);
            Assert.True(proxyFake.ConfigedTypes.Contains(typeof(TupleWithoutNamespace)));
            Assert.True(proxyFake.ConfigedTypes.Contains(typeof(Tuple<int, string>)));
        }
        public void Configure_TestAssemblyFilteredByNamespace_ConfiguresTuplesInNamespace()
        {
            var proxyFake = new TupleSerializerInitializerProxyFake();

            new TupleSerializerConfigurator { JsConfigProxy = proxyFake }
                .WithAssemblies(new[] { Assembly.GetExecutingAssembly() })
                .WithNamespaceFilter(s => s.Equals("TupleWithNamespace", StringComparison.OrdinalIgnoreCase))
                .Configure();

            Assert.Equal(3, proxyFake.ConfigedTypes.Count);
            Assert.True(proxyFake.ConfigedTypes.Contains(typeof(ObjectThatInheritsFromTuple)));
            Assert.True(proxyFake.ConfigedTypes.Contains(typeof(Tuple<string, string>)));
            Assert.True(proxyFake.ConfigedTypes.Contains(typeof(Tuple<double, double>)));
        }
        public void Configure_TestAssemblyFilteredToGenericParametersNamespace_DoesNotConfigureAnyTuples()
        {
            var proxyFake = new TupleSerializerInitializerProxyFake();

            new TupleSerializerConfigurator { JsConfigProxy = proxyFake }
                .WithAssemblies(new[] { Assembly.GetExecutingAssembly() })
                .WithNamespaceFilter(s => s.Equals("NestedInGenerics", StringComparison.OrdinalIgnoreCase))
                .Configure();

            Assert.Equal(4, proxyFake.ConfigedTypes.Count);
            Assert.True(proxyFake.ConfigedTypes.Contains(typeof(Tuple<string>)));
            Assert.True(proxyFake.ConfigedTypes.Contains(typeof(Tuple<int>)));
            Assert.True(proxyFake.ConfigedTypes.Contains(typeof(Tuple<bool, bool>)));
            Assert.True(proxyFake.ConfigedTypes.Contains(typeof(Tuple<int, int>)));
        }
        public void Configure_TestAssemblyFilteredByEmptyNamespace_ConfiguresTuplesWithoutANamespace()
        {
            var proxyFake = new TupleSerializerInitializerProxyFake();

            new TupleSerializerConfigurator {
                JsConfigProxy = proxyFake
            }
            .WithAssemblies(new[] { Assembly.GetExecutingAssembly() })
            .WithNamespaceFilter(s => s.Equals(string.Empty, StringComparison.OrdinalIgnoreCase))
            .Configure();

            Assert.Equal(2, proxyFake.ConfigedTypes.Count);
            Assert.True(proxyFake.ConfigedTypes.Contains(typeof(TupleWithoutNamespace)));
            Assert.True(proxyFake.ConfigedTypes.Contains(typeof(Tuple <int, string>)));
        }
        public void Configure_TestAssemblyFilteredByNamespace_ConfiguresTuplesInNamespace()
        {
            var proxyFake = new TupleSerializerInitializerProxyFake();

            new TupleSerializerConfigurator {
                JsConfigProxy = proxyFake
            }
            .WithAssemblies(new[] { Assembly.GetExecutingAssembly() })
            .WithNamespaceFilter(s => s.Equals("TupleWithNamespace", StringComparison.OrdinalIgnoreCase))
            .Configure();

            Assert.Equal(3, proxyFake.ConfigedTypes.Count);
            Assert.True(proxyFake.ConfigedTypes.Contains(typeof(ObjectThatInheritsFromTuple)));
            Assert.True(proxyFake.ConfigedTypes.Contains(typeof(Tuple <string, string>)));
            Assert.True(proxyFake.ConfigedTypes.Contains(typeof(Tuple <double, double>)));
        }
        public void Configure_TestAssemblyFilteredToGenericParametersNamespace_DoesNotConfigureAnyTuples()
        {
            var proxyFake = new TupleSerializerInitializerProxyFake();

            new TupleSerializerConfigurator {
                JsConfigProxy = proxyFake
            }
            .WithAssemblies(new[] { Assembly.GetExecutingAssembly() })
            .WithNamespaceFilter(s => s.Equals("NestedInGenerics", StringComparison.OrdinalIgnoreCase))
            .Configure();

            Assert.Equal(4, proxyFake.ConfigedTypes.Count);
            Assert.True(proxyFake.ConfigedTypes.Contains(typeof(Tuple <string>)));
            Assert.True(proxyFake.ConfigedTypes.Contains(typeof(Tuple <int>)));
            Assert.True(proxyFake.ConfigedTypes.Contains(typeof(Tuple <bool, bool>)));
            Assert.True(proxyFake.ConfigedTypes.Contains(typeof(Tuple <int, int>)));
        }