Пример #1
0
        protected void Add_crm_abonnement(ofplug.crm.Abonnement crm_abonnement)
        {
            crm_abonnement.CrmEntity = new Entity("nrq_subscription");

            crm_abonnement.Fill_fields();

            _service.entitiesToReturn.Enqueue(new List <Entity> {
                crm_abonnement.CrmEntity
            });
        }
Пример #2
0
        protected void Add_crm_abonnement(Action <ofplug.crm.Abonnement> adjust_abonnement)
        {
            ofplug.crm.Abonnement crm_abonnement = new ofplug.crm.Abonnement(_service, _tracingService)
            {
            };

            adjust_abonnement(crm_abonnement);

            Add_crm_abonnement(crm_abonnement);
        }
Пример #3
0
        public void Create_or_update_one_abonnement_in_of_will_do_nothing_if_a_fully_updated_subscription_exists()
        {
            Add_of_abonnement(of_abonnement => of_abonnement.Crm_id = Guid.Empty.ToString().ToLower());
            ofplug.Logic.Abonnement.Maintain maintain       = Arrange_maintain();
            ofplug.crm.Abonnement            crm_abonnoment = new ofplug.crm.Abonnement(_service, _tracingService)
            {
                Nrq_of_id         = _id.Get_id("of_subscription_id"),
                Id                = Guid.Empty,
                Nrq_of_contact_id = _id.Get_id("of_contact_id"),
            };

            maintain.Create_or_update_one_abonnement_in_of(crm_abonnoment);

            Assert_no_writes();
        }
Пример #4
0
        public void Create_or_update_one_abonnement_in_of_can_patch_a_subscription()
        {
            Add_of_abonnement(of_abonnement => of_abonnement.Crm_id = Guid.Empty.ToString().ToLower());
            ofplug.Logic.Abonnement.Maintain maintain = Arrange_maintain();
            _sender.data_to_return.Enqueue(new List <int> {
                _id.Get_id("abonnement_id")
            });
            ofplug.crm.Abonnement crm_abonnoment = new ofplug.crm.Abonnement(_service, _tracingService)
            {
                Nrq_of_id = _id.Get_id("of_subscription_id"),
                Id        = Guid.Empty,
            };

            maintain.Create_or_update_one_abonnement_in_of(crm_abonnoment);

            Assert.IsTrue(_sender.Log.Single(log =>
                                             log.Operation == Mock.SenderMock.Operation.Patch).Request.GetType() == typeof(ofplug.of.data.Subscription));
        }