Beispiel #1
0
 private static void ValidateMappingOutcome(mappingsMappingMapping_outcome msg, OutcomeMappingCacheItem ci)
 {
     Assert.AreEqual(msg.outcome_id, ci.OutcomeId);
     Assert.AreEqual(msg.product_outcome_id, ci.ProducerOutcomeId);
     Assert.IsNotNull(ci.ProducerOutcomeNames);
     Assert.AreEqual(2, ci.ProducerOutcomeNames.Count);
     Assert.AreEqual(msg.product_outcome_name, ci.ProducerOutcomeNames.First().Value);
 }
        internal OutcomeMappingDTO(mappingsMappingMapping_outcome outcome)
        {
            Guard.Argument(outcome, nameof(outcome)).NotNull();

            OutcomeId          = outcome.outcome_id;
            ProductOutcomeId   = outcome.product_outcome_id;
            ProductOutcomeName = outcome.product_outcome_name;
        }
        internal OutcomeMappingDTO(mappingsMappingMapping_outcome outcome, string marketId)
        {
            Guard.Argument(outcome, nameof(outcome)).NotNull();
            Guard.Argument(marketId, nameof(marketId)).NotNull().NotEmpty();

            OutcomeId           = outcome.outcome_id;
            ProducerOutcomeId   = outcome.product_outcome_id;
            ProducerOutcomeName = outcome.product_outcome_name;
            MarketId            = marketId;
        }
        internal OutcomeMappingDTO(mappingsMappingMapping_outcome outcome, string marketId)
        {
            Contract.Requires(outcome != null);
            Contract.Requires(!string.IsNullOrEmpty(marketId));

            OutcomeId           = outcome.outcome_id;
            ProducerOutcomeId   = outcome.product_outcome_id;
            ProducerOutcomeName = outcome.product_outcome_name;
            MarketId            = marketId;
        }
Beispiel #5
0
 private static void ValidateMappingOutcome(mappingsMappingMapping_outcome msg, OutcomeMappingDTO dto)
 {
     Assert.AreEqual(msg.outcome_id, dto.OutcomeId);
     Assert.AreEqual(msg.product_outcome_id, dto.ProducerOutcomeId);
     Assert.AreEqual(msg.product_outcome_name, dto.ProducerOutcomeName);
 }