public void Test()
        {
            var preparation = new Preparator(
                TestContext,
                nameof(ScopeConstantTargetM0_Cluster.ScopeConstantTargetM0_ClusterTester),
                nameof(TestResources.ScopeConstantTargetM0_Cluster),
                TestResources.ScopeConstantTargetM0_Cluster
                );

            preparation.Check();

            Assert.AreEqual(0, preparation.DiagnosticReporter.WarningCount, "Warning count");
            Assert.AreEqual(1, preparation.DiagnosticReporter.Exceptions.Count, "Error count");
        }
        public void Test()
        {
            var preparation = new Preparator(
                TestContext,
                nameof(UnsortedPlainArray2_Cluster.UnsortedPlainArray2_ClusterTester),
                nameof(TestResources.UnsortedPlainArray2_Cluster),
                TestResources.UnsortedPlainArray2_Cluster
                );

            preparation.Check();

            Assert.AreEqual(0, preparation.DiagnosticReporter.WarningCount, "Warning count");
            Assert.AreEqual(0, preparation.DiagnosticReporter.Exceptions.Count, "Error count");
        }
        public void Test()
        {
            var preparation = new Preparator(
                TestContext,
                nameof(ConditionalGenericHierarchy2_Cluster.ConditionalGenericHierarchy2_ClusterTester),
                nameof(TestResources.ConditionalGenericHierarchy2_Cluster),
                TestResources.ConditionalGenericHierarchy2_Cluster
                );

            preparation.Check();

            Assert.AreEqual(0, preparation.DiagnosticReporter.ErrorCount, "Error count");
            Assert.AreEqual(0, preparation.DiagnosticReporter.WarningCount, "Warning count");
        }
        public void Test()
        {
            var preparation = new Preparator(
                TestContext,
                nameof(GetAllNonGenericTwoObjectsConditional1_Cluster.GetAllNonGenericTwoObjectsConditional1_ClusterTester),
                nameof(TestResources.GetAllNonGenericTwoObjectsConditional1_Cluster),
                TestResources.GetAllNonGenericTwoObjectsConditional1_Cluster
                );

            preparation.Check();

            Assert.AreEqual(0, preparation.DiagnosticReporter.ErrorCount, "Error count");
            Assert.AreEqual(0, preparation.DiagnosticReporter.WarningCount, "Warning count");
        }
Exemplo n.º 5
0
        public void Test()
        {
            var preparation = new Preparator(
                TestContext,
                nameof(SettingsConstructorAllAndOrderTwo_Cluster.SettingsConstructorAllAndOrderTwo_ClusterTester),
                nameof(TestResources.SettingsConstructorAllAndOrderTwo_Cluster),
                TestResources.SettingsConstructorAllAndOrderTwo_Cluster
                );

            preparation.Check();

            Assert.AreEqual(0, preparation.DiagnosticReporter.ErrorCount, "Error count");
            Assert.AreEqual(0, preparation.DiagnosticReporter.WarningCount, "Warning count");
        }
        public void Test()
        {
            var preparation = new Preparator(
                TestContext,
                nameof(ConventionsFromSingleInterface1_Cluster.ConventionsFromSingleInterface1_ClusterTester),
                nameof(TestResources.ConventionsFromSingleInterface1_Cluster),
                TestResources.ConventionsFromSingleInterface1_Cluster
                );

            preparation.Check();

            Assert.AreEqual(0, preparation.DiagnosticReporter.ErrorCount, "Error count");
            Assert.AreEqual(0, preparation.DiagnosticReporter.WarningCount, "Warning count");
        }
        public void Test()
        {
            var preparation = new Preparator(
                TestContext,
                nameof(FactoryUnknownConstructorArgument0_Cluster.FactoryUnknownConstructorArgument0_ClusterTester),
                nameof(TestResources.FactoryUnknownConstructorArgument0_Cluster),
                TestResources.FactoryUnknownConstructorArgument0_Cluster
                );

            preparation.Check();

            Assert.AreEqual(0, preparation.DiagnosticReporter.ErrorCount, "Error count");
            Assert.AreEqual(0, preparation.DiagnosticReporter.WarningCount, "Warning count");
        }
        public void Test()
        {
            var preparation = new Preparator(
                TestContext,
                nameof(ProxySimpleWithDefault0_Cluster.ProxySimpleWithDefault0_ClusterTester),
                nameof(TestResources.ProxySimpleWithDefault0_Cluster),
                TestResources.ProxySimpleWithDefault0_Cluster
                );

            preparation.Check();

            Assert.AreEqual(0, preparation.DiagnosticReporter.ErrorCount, "Error count");
            Assert.AreEqual(0, preparation.DiagnosticReporter.WarningCount, "Warning count");
        }
Exemplo n.º 9
0
        public void Test()
        {
            var preparation = new Preparator(
                TestContext,
                nameof(ActivationExcessiveTooManyRoots1_Cluster.ActivationExcessiveTooManyRoots1_ClusterTester),
                nameof(TestResources.ActivationExcessiveTooManyRoots1_Cluster),
                TestResources.ActivationExcessiveTooManyRoots1_Cluster
                );

            preparation.Check();

            Assert.AreEqual(0, preparation.DiagnosticReporter.ErrorCount, "Error count");
            Assert.AreEqual(0, preparation.DiagnosticReporter.WarningCount, "Warning count");
        }
Exemplo n.º 10
0
        public void Test()
        {
            var preparation = new Preparator(
                TestContext,
                nameof(DefaultValueTransient_Cluster.DefaultValueTransient_ClusterTester),
                nameof(TestResources.DefaultValueTransient_Cluster),
                TestResources.DefaultValueTransient_Cluster
                );

            preparation.Check();

            Assert.AreEqual(0, preparation.DiagnosticReporter.ErrorCount, "Error count");
            Assert.AreEqual(0, preparation.DiagnosticReporter.WarningCount, "Warning count");
        }
        public void Test()
        {
            var preparation = new Preparator(
                TestContext,
                nameof(ClusterNonGenericDifferentFunc_ClusterTester),
                nameof(TestResources.ClusterNonGenericDifferentFunc_Cluster),
                TestResources.ClusterNonGenericDifferentFunc_Cluster
                );

            preparation.Check();

            Assert.AreEqual(0, preparation.DiagnosticReporter.ErrorCount, "Error count");
            Assert.AreEqual(0, preparation.DiagnosticReporter.WarningCount, "Warning count");
        }
Exemplo n.º 12
0
        public void Test()
        {
            var preparation = new Preparator(
                TestContext,
                nameof(ScopeSingletonNonGenericSingleInterfaceSingleObject_Cluster.ScopeSingletonNonGenericSingleInterfaceSingleObject_ClusterTester),
                nameof(TestResources.ScopeSingletonNonGenericSingleInterfaceSingleObject_Cluster),
                TestResources.ScopeSingletonNonGenericSingleInterfaceSingleObject_Cluster
                );

            preparation.Check();

            Assert.AreEqual(0, preparation.DiagnosticReporter.ErrorCount, "Error count");
            Assert.AreEqual(0, preparation.DiagnosticReporter.WarningCount, "Warning count");
        }
Exemplo n.º 13
0
        public void Test()
        {
            var preparation = new Preparator(
                TestContext,
                nameof(WrapperFuncSingleton_Cluster.WrapperFuncSingleton_ClusterTester),
                nameof(TestResources.WrapperFuncSingleton_Cluster),
                TestResources.WrapperFuncSingleton_Cluster
                );

            preparation.Check();

            Assert.AreEqual(0, preparation.DiagnosticReporter.ErrorCount, "Error count");
            Assert.AreEqual(0, preparation.DiagnosticReporter.WarningCount, "Warning count");
        }
        public void Test()
        {
            var preparation = new Preparator(
                TestContext,
                nameof(UnsortedGenericIsRegistered_Cluster.UnsortedGenericIsRegistered_ClusterTester),
                nameof(TestResources.UnsortedGenericIsRegistered_Cluster),
                TestResources.UnsortedGenericIsRegistered_Cluster
                );

            preparation.Check();

            Assert.AreEqual(0, preparation.DiagnosticReporter.ErrorCount, "Error count");
            Assert.AreEqual(0, preparation.DiagnosticReporter.WarningCount, "Warning count");
        }
Exemplo n.º 15
0
        public void Test()
        {
            var preparation = new Preparator(
                TestContext,
                nameof(UnsortedCircularDependency3_Cluster.UnsortedCircularDependency3Cluster_Tester),
                nameof(TestResources.UnsortedCircularDependency3_Cluster),
                TestResources.UnsortedCircularDependency3_Cluster
                );

            preparation.Check();

            //no check for warning because here is a lot of warnings due to circular dependency
            Assert.AreEqual(1, preparation.DiagnosticReporter.Exceptions.Count, "Error count");
            Assert.AreEqual(DpdtExceptionTypeEnum.CircularDependency, preparation.DiagnosticReporter.GetDpdtException().Type);
        }
Exemplo n.º 16
0
        public void Test()
        {
            var preparation = new Preparator(
                TestContext,
                nameof(UnsortedInvalidToType_Cluster.UnsortedInvalidToType_ClusterTester),
                nameof(TestResources.UnsortedInvalidToType_Cluster),
                TestResources.UnsortedInvalidToType_Cluster
                );

            preparation.Check();

            Assert.AreEqual(0, preparation.DiagnosticReporter.WarningCount, "Warning count");
            Assert.AreEqual(1, preparation.DiagnosticReporter.Exceptions.Count, "Error count");
            Assert.AreEqual(DpdtExceptionTypeEnum.IncorrectBinding_IncorrectTarget, preparation.DiagnosticReporter.GetDpdtException().Type);
        }
        public void Test()
        {
            var preparation = new Preparator(
                TestContext,
                nameof(ClusterGenericDifferentConditional4_ClusterTester),
                nameof(TestResources.ClusterGenericDifferentConditional4_Cluster),
                TestResources.ClusterGenericDifferentConditional4_Cluster
                );

            preparation.Check();

            Assert.AreEqual(1, preparation.DiagnosticReporter.ErrorCount, "Error count");
            Assert.AreEqual(0, preparation.DiagnosticReporter.WarningCount, "Warning count");
            Assert.AreEqual(DpdtExceptionTypeEnum.NoBindingAvailable, preparation.DiagnosticReporter.GetInnerDpdtException().Type);
            Assert.AreEqual(typeof(IB).FullName, preparation.DiagnosticReporter.GetInnerDpdtException().AdditionalArgument);
        }
        public void Test()
        {
            var preparation = new Preparator(
                TestContext,
                nameof(SettingsCrossClusterOnlyLocalCluster0_ClusterTester),
                nameof(TestResources.SettingsCrossClusterOnlyLocalCluster0_Cluster),
                TestResources.SettingsCrossClusterOnlyLocalCluster0_Cluster
                );

            preparation.Check();

            Assert.AreEqual(1, preparation.DiagnosticReporter.ErrorCount, "Error count");
            Assert.AreEqual(0, preparation.DiagnosticReporter.WarningCount, "Warning count");
            Assert.AreEqual(DpdtExceptionTypeEnum.NoBindingAvailable, preparation.DiagnosticReporter.GetDpdtException().Type);
            Assert.AreEqual(typeof(IA).ToGlobalDisplayString(), preparation.DiagnosticReporter.GetDpdtException().AdditionalArgument);
        }
Exemplo n.º 19
0
        public void Test()
        {
            var preparation = new Preparator(
                TestContext,
                nameof(ClusterBindTransient_Cluster.ClusterBindTransient_ClusterTester),
                nameof(TestResources.ClusterBindTransient_Cluster),
                TestResources.ClusterBindTransient_Cluster
                );

            preparation.Check();

            Assert.AreEqual(1, preparation.DiagnosticReporter.ErrorCount, "Error count");
            Assert.AreEqual(0, preparation.DiagnosticReporter.WarningCount, "Warning count");
            Assert.AreEqual(DpdtExceptionTypeEnum.BindToClusterType, preparation.DiagnosticReporter.GetDpdtException().Type);
            Assert.AreEqual(typeof(SubjectCluster).FullName, preparation.DiagnosticReporter.GetDpdtException().AdditionalArgument);
        }
Exemplo n.º 20
0
        public void Test()
        {
            var preparation = new Preparator(
                TestContext,
                nameof(ProxyTwoSameProxy_Cluster.ProxyTwoSameProxy_ClusterTester),
                nameof(TestResources.ProxyTwoSameProxy_Cluster),
                TestResources.ProxyTwoSameProxy_Cluster
                );

            preparation.Check();

            //check for only ony proxy class was generated; in this case we will receive DpdtExceptionTypeEnum.DuplicateBinding exception
            //otherwise, we will receive strange compilation error and AssertFailException
            Assert.AreEqual(1, preparation.DiagnosticReporter.ErrorCount, "Error count");
            Assert.AreEqual(DpdtExceptionTypeEnum.DuplicateBinding, preparation.DiagnosticReporter.GetInnerDpdtException().Type);
            Assert.AreEqual(0, preparation.DiagnosticReporter.WarningCount, "Warning count");
        }
Exemplo n.º 21
0
 public static Node Parse(string str, Context cxt) => Parse(new Tokenizer(new StringReader(Preparator.Prepare(str, cxt))));
Exemplo n.º 22
0
 public static Node Parse(string str) => Parse(new Tokenizer(new StringReader(Preparator.Prepare(str))));