Beispiel #1
0
        protected static void Establish_context()
        {
            legalentity = LegalEntityData.CreateContractForEntityCreation();

            content = HttpContentExtensions.CreateDataContract(legalentity);
            client  = new HttpClient();
        }
        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 Because_of()
        {
            var entity = LegalEntityData.CreateBasicEntityWithOneMapping();

            client = new HttpClient(ServiceUrl["LegalEntity"] + string.Format("{0}/mapping/{1}", entity.Id, int.MaxValue));

            response = client.Get();
        }
        protected static void Establish_context()
        {
            entity = LegalEntityData.CreateBasicEntity();
            var notAMapping = new EnergyTrading.MDM.Contracts.Sample.LegalEntity();

            content = HttpContentExtensions.CreateDataContract(notAMapping);
            client  = new HttpClient();
        }
        protected static void Establish_context()
        {
            entity = LegalEntityData.CreateBasicEntityWithOneMapping();
            client = new HttpClient();
            var notAMapping = new MDM.LegalEntity();

            content      = HttpContentExtensions.CreateDataContract(notAMapping);
            startVersion = CurrentEntityVersion();
        }
Beispiel #6
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));
        }
Beispiel #7
0
        protected static void Because_of()
        {
            entity = LegalEntityData.CreateEntityWithTwoDetailsAndTwoMappings();

            client = new HttpClient(ServiceUrl["LegalEntity"] +
                                    "crossmap?source-system=trayport&destination-system=endur&mapping-string=" + entity.Mappings[0].MappingValue
                                    + "&as-of=" + entity.Mappings[0].Validity.Start.ToString(DateFormatString));

            response        = client.Get();
            mappingResponse = response.Content.ReadAsDataContract <EnergyTrading.Mdm.Contracts.MappingResponse>();
        }
Beispiel #8
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()
        {
            entity1 = LegalEntityData.CreateBasicEntityWithOneMapping();

            client = new HttpClient();

            Search search = SearchBuilder.CreateSearch(isMappingSearch: true);

            search.AddSearchCriteria(SearchCombinator.And).AddCriteria(
                "MappingValue", SearchCondition.Equals, entity1.Mappings[0].MappingValue).AddCriteria(
                "System.Name", SearchCondition.Equals, "Endur");

            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();
        }
        protected static void Establish_context()
        {
            entity = LegalEntityData.CreateBasicEntityWithOneMapping();
            currentTrayportMapping = entity.Mappings[0];

            mapping = new EnergyTrading.Mdm.Contracts.Mapping {
                SystemName             = currentTrayportMapping.System.Name,
                Identifier             = currentTrayportMapping.MappingValue,
                SourceSystemOriginated = currentTrayportMapping.IsMaster,
                DefaultReverseInd      = currentTrayportMapping.IsDefault,
                StartDate = currentTrayportMapping.Validity.Start,
                EndDate   = currentTrayportMapping.Validity.Finish.AddDays(2)
            };

            content = HttpContentExtensions.CreateDataContract(mapping);
            client  = new HttpClient();
        }
Beispiel #12
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);
 }
Beispiel #14
0
 protected static void Establish_context()
 {
     legalentity = LegalEntityData.CreateEntityWithTwoDetailsAndTwoMappings();
 }