protected static void Establish_context()
        {
            client = new HttpClient();
            entity = LegalEntityData.CreateBasicEntity();

            content      = HttpContentExtensions.CreateDataContract(new EnergyTrading.MDM.Contracts.Sample.LegalEntity());
            startVersion = CurrentEntityVersion();
        }
        protected static void Establish_context()
        {
            entity = LegalEntityData.CreateBasicEntity();
            var notAMapping = new EnergyTrading.MDM.Contracts.Sample.LegalEntity();

            content = HttpContentExtensions.CreateDataContract(notAMapping);
            client  = new HttpClient();
        }
Пример #3
0
        protected static void Establish_context()
        {
            client = new HttpClient();
            entity = LegalEntityData.CreateBasicEntity();
            var getResponse = client.Get(ServiceUrl["LegalEntity"] + entity.Id);

            updatedContract = getResponse.Content.ReadAsDataContract <EnergyTrading.MDM.Contracts.Sample.LegalEntity>();
            content         = HttpContentExtensions.CreateDataContract(LegalEntityData.MakeChangeToContract(updatedContract));
        }
Пример #4
0
        protected static void Establish_context()
        {
            entity1 = LegalEntityData.CreateBasicEntity();
            entity2 = LegalEntityData.CreateBasicEntity();

            client = new HttpClient();

            var search = new Search().IsMutliPage().MaxPageSize(1);

            LegalEntityData.CreateSearch(search, entity1, entity2);

            content = HttpContentExtensions.CreateDataContract(search);
        }
        protected static void Establish_context()
        {
            entity  = LegalEntityData.CreateBasicEntity();
            mapping = new EnergyTrading.Mdm.Contracts.Mapping {
                SystemName             = "Endur",
                Identifier             = Guid.NewGuid().ToString(),
                SourceSystemOriginated = false,
                DefaultReverseInd      = false,
                StartDate = Script.baseDate,
                EndDate   = Script.baseDate.AddDays(2)
            };

            content = HttpContentExtensions.CreateDataContract(mapping);
            client  = new HttpClient();
        }
Пример #6
0
 protected static void Establish_context()
 {
     entity1 = LegalEntityData.CreateBasicEntity();
     entity2 = LegalEntityData.CreateBasicEntity();
 }
 protected static void Because_of()
 {
     entity = LegalEntityData.CreateBasicEntity();
     client.DefaultHeaders.Add("If-Match", entity.Version.ToString());
     response = client.Post(ServiceUrl["LegalEntity"] + entity.Id, content);
 }