public void CustomisationImportTestImportService()
        {
            PrepareTests();

            var requests = TestCustomisationImportRequest.GetTestRequests(ExecutionPath);

            DeleteRelationships(requests);
            DeleteEntities(requests);
            DeleteOptionSets(requests);

            var importService =
                new XrmCustomisationImportService(XrmRecordService);

            foreach (var request in requests)
            {
                var response = importService.Execute(request, Controller);
                if (response.HasError)
                {
                    Assert.Fail(response.GetResponseItemsWithError().First().Exception.DisplayString());
                }

                Assert.IsFalse(response.ExcelReadErrors);
                Assert.IsNull(response.Exception);

                ClearCache();

                VerifyRelationships(request);
                VerifyRecordTypes(request);
                VerifyFields(request);
                VerifyOptionSets(request);
                VerifyViews(request);
            }
        }
예제 #2
0
        public void CustomisationImportTestImportModule()
        {
            //create test application with module loaded
            var testApplication = CreateAndLoadTestApplication <CustomisationImportModule>();

            //first script generation of C# entities and fields
            var request = TestCustomisationImportRequest.GetTestRequests(ExecutionPath).First();

            var response = testApplication.NavigateAndProcessDialog <CustomisationImportModule, XrmCustomisationImportDialog, CustomisationImportResponse>(request);

            Assert.IsFalse(response.HasError);
        }
        public void CustomisationImportTestImportModule()
        {
            //create test application with module loaded
            var testApplication = CreateAndLoadTestApplication <CustomisationImportModule>();

            //first script generation of C# entities and fields
            var request = TestCustomisationImportRequest.GetTestRequests(ExecutionPath).ElementAt(1);

            var response = testApplication.NavigateAndProcessDialog <CustomisationImportModule, CustomisationImportDialog, CustomisationImportResponse>(request);

            if (response.HasError)
            {
                Assert.Fail(response.GetResponseItemsWithError().First().Exception.DisplayString());
            }
        }