Beispiel #1
0
        public void Should_connect_to_CRM()
        {
            var ctx = new XrmRealContext();
            var ex  = Record.Exception(() => ctx.GetOrganizationService());

            Assert.Null(ex);
        }
Beispiel #2
0
        public void Should_connect_to_CRM_with_given_OrganizationService()
        {
            var ctx = new XrmRealContext();
            var organizationService = ctx.GetOrganizationService();
            var ctx2 = new XrmRealContext(organizationService);

            Assert.Equal(organizationService, ctx2.GetOrganizationService());
        }
Beispiel #3
0
        public void Initialize()
        {
            //Initialize the Context with Admin Account
            context = new XrmRealContext("Xrm");

            //To Run the Plugin with User Context, Add a new ConnectionString and Pass the connectionStringName
            //context = new XrmRealContext("Xrm_Officer");
            //context = new XrmRealContext("Xrm_Manager");

            organizationService = context.GetOrganizationService();

            //Use this method to arrange the required data.
            Entity entity = new Entity("account");

            entity["name"] = "Fourth Coffee Pvt. Ltd";
            Guid accountId = organizationService.Create(entity);

            parameters.Add("Account", entity);
            parameters.Add("AccountId", accountId);

            deleteObjects.Add("account", accountId);
        }
Beispiel #4
0
        public void Should_connect_to_CRM()
        {
            var ctx = new XrmRealContext();

            Assert.DoesNotThrow(() => ctx.GetOrganizationService());
        }
 public void Should_connect_to_CRM()
 {
     var ctx = new XrmRealContext();
     Assert.DoesNotThrow(() => ctx.GetOrganizationService());
 }