Ejemplo n.º 1
0
 public SpecificationFixtureBase()
 {
     OrganizationService = new OrganizationService(ConnectionStringSettingName);
     CrmReader           = new CrmReader(OrganizationService);
     CrmWriter           = new CrmWriter(OrganizationService);
     EntityFactory       = new EntityFactory(OrganizationService, new CrmReader(OrganizationService));
     EntitySerializer    = new EntitySerializer(OrganizationService);
     RequestId           = Guid.NewGuid();
 }
Ejemplo n.º 2
0
        public void PerformTestSetup()
        {
            MessageName = "AddToQueue";

            var targetEntity = EntityFactory.CreateLetter();

            AddToQueueRequest = new AddToQueueRequest
            {
                Target              = targetEntity.ToEntityReference(),
                DestinationQueueId  = CrmReader.GetOrCreateQueue("queueName"),
                QueueItemProperties = new Entity("queueitem")
            };
        }
        public void PerformTestSetup()
        {
            MessageName = "Assign";

            var targetEntity = new Entity("contact")
            {
                Id = Guid.NewGuid()
            };

            targetEntity["firstname"] = "DummyFirstName";
            OrganizationService.Create(targetEntity);

            AssignRequest = new AssignRequest
            {
                Target   = targetEntity.ToEntityReference(),
                Assignee = CrmReader.GetSystemUser()
            };
        }
        public void PerformTestSetup()
        {
            MessageName = "QualifyLead";

            var accountEntity  = EntityFactory.CreateAccount();
            var campaignEntity = EntityFactory.CreateCampaign();
            var leadEntity     = EntityFactory.CreateLead();

            QualifyLeadRequest = new QualifyLeadRequest
            {
                CreateAccount         = true,
                CreateContact         = true,
                CreateOpportunity     = true,
                LeadId                = leadEntity.ToEntityReference(),
                OpportunityCurrencyId = CrmReader.GetCurrencyId(),
                OpportunityCustomerId = accountEntity.ToEntityReference(),
                SourceCampaignId      = campaignEntity.ToEntityReference(),
                Status                = new OptionSetValue(3)
            };
        }