Exemple #1
0
        public void TestMethod1()
        {
            var context = new XrmRealContext
            {
                ProxyTypesAssembly   = typeof(UpdateSharePointMetadata).Assembly,
                ConnectionStringName = "CRMOnline"
            };

            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
            var executionContext = context.GetDefaultWorkflowContext();

            //Inputs
            var inputs = new Dictionary <string, object>();

            inputs.Add("Parent_Entity_Name", "defra_application");
            inputs.Add("Parent_Lookup_Name", "defra_applicationid");
            inputs.Add("Customer", "customer");
            inputs.Add("SiteDetails", "site");
            inputs.Add("PermitDetails", "permit");

            var ltdCompnayId = Guid.Parse("2DAEA1DC-C2A7-E911-A980-000D3A20838A");
            var mainApp      = new Entity("defra_application", ltdCompnayId);

            var result = context.ExecuteCodeActivity <UpdateSharePointMetadata>
                             (mainApp, inputs);
        }
Exemple #2
0
        public void TestMethod1()
        {
            var context = new XrmRealContext
            {
                ProxyTypesAssembly   = typeof(UploadEmailAndAttachmentsToSharePoint).Assembly,
                ConnectionStringName = "CRMOnline"
            };

            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
            var executionContext = context.GetDefaultWorkflowContext();

            //Inputs
            var inputs = new Dictionary <string, object>();

            // master var mailId = Guid.Parse("575e588c-4ea2-e911-aa05-000d3a2065c5");
            //0ec946a0-fcf3-e911-a811-000d3a649465

            var mailId  = Guid.Parse("d667072e-dfff-e911-a811-000d3a64905b");
            var mainApp = new Entity("email", mailId);

            //inputs.Add("Application", new Entity("defra_application", mailId).ToEntityReference());

            var result = context.ExecuteCodeActivity <UploadEmailAndAttachmentsToSharePoint>
                             (mainApp, inputs);
        }
Exemple #3
0
        public void Test_For_Registeredcharity_Operator_Name()
        {
            var context = new XrmRealContext
            {
                ProxyTypesAssembly   = typeof(GetAddressBasedOnOperatorType).Assembly,
                ConnectionStringName = "CRMOnline"
            };

            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
            var executionContext = context.GetDefaultWorkflowContext();

            //Inputs
            var inputs = new Dictionary <string, object>();

            inputs.Add("GetContact", new EntityReference("contact", null));
            inputs.Add("GetAccount", new EntityReference("account", new Guid("95F84FA5-F3EF-49C6-AC51-AB307DCF4151")));
            // inputs.Add("GetOperatorType", new OptionSetValue((int)defra_organisation_type.Limitedcompany));


            var partnerId = Guid.Parse("86C561FF-D2A7-E911-AA0A-000D3A2065C5");
            var mainApp   = new Entity("defra_application", partnerId);

            var result = context.ExecuteCodeActivity <GetAddressBasedOnOperatorType>
                             (mainApp, inputs);
        }
Exemple #4
0
        public void Test_Invalid_Not()
        {
            var context = new XrmRealContext
            {
                ProxyTypesAssembly   = typeof(GetWasteCodesGivenApplictaion).Assembly,
                ConnectionStringName = "CRMOnline"
            };

            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
            var executionContext = context.GetDefaultWorkflowContext();

            //Inputs
            var inputs = new Dictionary <string, object>();

            var ltdCompnayId = Guid.Parse("c9a1300d-1cef-e811-a97a-000d3a233e06");

            var mainApp = new Entity("defra_application", ltdCompnayId);

            var result = context.ExecuteCodeActivity <GetWasteCodesGivenApplictaion>
                             (mainApp, inputs);
        }
Exemple #5
0
        public void Test_valid_Not()
        {
            var context = new XrmRealContext
            {
                ProxyTypesAssembly   = typeof(GetDandRCodesGivenApplication).Assembly,
                ConnectionStringName = "CRMOnline"
            };

            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
            var executionContext = context.GetDefaultWorkflowContext();

            //Inputs
            var inputs = new Dictionary <string, object>();

            var ltdCompnayId = Guid.Parse("3A54B8B0-E31B-EA11-A811-000D3A44A237");

            var mainApp = new Entity("defra_application", ltdCompnayId);

            var result = context.ExecuteCodeActivity <GetDandRCodesGivenApplication>
                             (mainApp, inputs);
        }
Exemple #6
0
        public void Test_For_Partner_Operator_Name()
        {
            var context = new XrmRealContext
            {
                ProxyTypesAssembly   = typeof(GetAddressBasedOnOperatorType).Assembly,
                ConnectionStringName = "CRMOnline"
            };

            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
            var executionContext = context.GetDefaultWorkflowContext();

            //Inputs
            var inputs = new Dictionary <string, object>();


            var partnerId = Guid.Parse("86C561FF-D2A7-E911-AA0A-000D3A2065C5");
            var mainApp   = new Entity("defra_application", partnerId);

            var result = context.ExecuteCodeActivity <GetAddressBasedOnOperatorType>
                             (mainApp, inputs);
        }
Exemple #7
0
        public void Test_For_Otherorganisationforexampleacluborassociation_Operator_Name()
        {
            var context = new XrmRealContext
            {
                ProxyTypesAssembly   = typeof(GetAddressBasedOnOperatorType).Assembly,
                ConnectionStringName = "CRMOnline"
            };

            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
            var executionContext = context.GetDefaultWorkflowContext();

            //Inputs
            var inputs = new Dictionary <string, object>();


            var partnerId = Guid.Parse("EFBF132B-1EA9-E911-A980-000D3A20838A");
            var mainApp   = new Entity("defra_application", partnerId);

            var result = context.ExecuteCodeActivity <GetAddressBasedOnOperatorType>
                             (mainApp, inputs);
        }
        public void TestMethod1()
        {
            var context = new XrmRealContext
            {
                ProxyTypesAssembly   = typeof(GenerateApplicationTasksGivenTaskType).Assembly,
                ConnectionStringName = "CRMOnline"
            };

            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
            var executionContext = context.GetDefaultWorkflowContext();

            //Inputs
            var inputs = new Dictionary <string, object>();

            inputs.Add("Application", new EntityReference("defra_application", new Guid("ca31d9a8-9dc1-e811-a96a-000d3a23443b")));
            inputs.Add("TaskType1", new EntityReference("defra_tasktype", new Guid("f949cc52-6221-e911-a98d-000d3ab311f1")));
            inputs.Add("TaskType2", new EntityReference("defra_tasktype", new Guid("63987ec8-33ef-e811-a988-000d3ab31f97")));


            var result = context.ExecuteCodeActivity <GenerateApplicationTasksGivenTaskType>
                             (inputs);
        }
        public void Test_With_Valid_Application()
        {
            var context = new XrmRealContext
            {
                ProxyTypesAssembly   = typeof(GetValidPermitApplication).Assembly,
                ConnectionStringName = "CRMOnline"
            };

            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
            var executionContext = context.GetDefaultWorkflowContext();

            //Inputs
            var inputs = new Dictionary <string, object>();

            inputs.Add("GetPermit", new EntityReference("defra_permit", new Guid("DE129E7E-ECB1-E911-A98A-000D3A233E06")));

            var application = Guid.Parse("92622D64-FEB1-E911-A98A-000D3A233E06");

            var mainApp = new Entity("defra_application", application);

            var result = context.ExecuteCodeActivity <GetValidPermitApplication>
                             (mainApp, inputs); //
        }
Exemple #10
0
        public void TestMethod1()
        {
            var context = new XrmRealContext
            {
                ProxyTypesAssembly   = typeof(CreateDiscountLines).Assembly,
                ConnectionStringName = "CRMOnline"
            };

            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
            var executionContext = context.GetDefaultWorkflowContext();

            //Inputs
            var inputs = new Dictionary <string, object>();


            //9569808e-fd09-ea11-a811-000d3a649fc7

            var soleId  = Guid.Parse("2653dedd-8316-ea11-a811-000d3a44a2a9");
            var mainApp = new Entity("defra_application", soleId);

            var result = context.ExecuteCodeActivity <CreateDiscountLines>
                             (mainApp, inputs);
        }
Exemple #11
0
        public void TestMethod_When_Bespoke_Application_Is_NULL()
        {
            var context = new XrmRealContext
            {
                ProxyTypesAssembly   = typeof(GetPermitDetails).Assembly,
                ConnectionStringName = "CRMOnline"
            };

            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
            var executionContext = context.GetDefaultWorkflowContext();

            //Inputs
            var inputs = new Dictionary <string, object>();

            inputs.Add("Application", null);
            inputs.Add("Permit", new EntityReference("defra_permit", Guid.Parse("937f3266-db4c-ea11-a812-000d3a44ade8")));
            //9569808e-fd09-ea11-a811-000d3a649fc7

            var soleId  = Guid.Parse("7801c90f-3b15-ea11-a811-000d3a44a237");
            var mainApp = new Entity("defra_application", soleId);

            var result = context.ExecuteCodeActivity <GetPermitDetails>
                             (mainApp, inputs);
        }
Exemple #12
0
        public void TestMethod_When_bespoke()
        {
            var context = new XrmRealContext
            {
                ProxyTypesAssembly   = typeof(GetPermitDetails).Assembly,
                ConnectionStringName = "CRMOnline"
            };

            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
            var executionContext = context.GetDefaultWorkflowContext();

            //Inputs
            var inputs = new Dictionary <string, object>();

            inputs.Add("Application", new EntityReference("defra_application", Guid.Parse("67810b75-b420-ea11-a810-000d3a44a237")));
            inputs.Add("Permit", new EntityReference("defra_permit", null));
            //9569808e-fd09-ea11-a811-000d3a649fc7

            var soleId  = Guid.Parse("D8307C83-940B-EA11-A811-000D3ABAC0B9");
            var mainApp = new Entity("defra_application", soleId);

            var result = context.ExecuteCodeActivity <GetPermitDetails>
                             (mainApp, inputs);
        }
        public void TestMethod1()
        {
            var context = new XrmRealContext
            {
                ProxyTypesAssembly   = typeof(DeleteApplicationLinesGivenLineType).Assembly,
                ConnectionStringName = "CRMOnline"
            };

            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
            var executionContext = context.GetDefaultWorkflowContext();

            //Inputs
            var inputs = new Dictionary <string, object>();

            inputs.Add("GetLineType", 910400003);

            //9569808e-fd09-ea11-a811-000d3a649fc7

            var soleId  = Guid.Parse("a99288d1-9407-ea11-a811-000d3a44a237");
            var mainApp = new Entity("defra_application", soleId);

            var result = context.ExecuteCodeActivity <DeleteApplicationLinesGivenLineType>
                             (mainApp, inputs);
        }
Exemple #14
0
        public void TestMethod1()
        {
            var context = new XrmRealContext
            {
                ProxyTypesAssembly   = typeof(ApplicationCreateFolderInSharePoint).Assembly,
                ConnectionStringName = "CRMOnline"
            };

            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
            var executionContext = context.GetDefaultWorkflowContext();

            //Inputs
            var inputs = new Dictionary <string, object>();



            var ltdCompnayId = Guid.Parse("2DAEA1DC-C2A7-E911-A980-000D3A20838A");
            var mainApp      = new Entity("defra_application", ltdCompnayId);

            inputs.Add("Application", new Entity("defra_application", ltdCompnayId).ToEntityReference());

            var result = context.ExecuteCodeActivity <ApplicationCreateFolderInSharePoint>
                             (mainApp, inputs);
        }