예제 #1
0
 /// <summary>
 /// Gets the <see cref="IFixtureChange{T}"/> implementation representing the received fixture change message translated to the specified languages
 /// </summary>
 /// <param name="culture">A <see cref="CultureInfo"/> specifying the language of which to translate the message or a null reference to translate the message
 /// to languages specified in the configuration</param>
 /// <returns>Returns the <see cref="IFixtureChange{T}"/> implementation representing the received fixture change message translated to the specified languages</returns>
 public IFixtureChange <T> GetFixtureChange(CultureInfo culture = null)
 {
     return(_messageMapper.MapFixtureChange <T>(
                _feedMessage,
                culture == null
             ? _defaultCultures
             : new[] { culture },
                _rawMessage));
 }
        public void FixtureChangeIsMapped()
        {
            var stream  = FileHelper.OpenFile(TestData.FeedXmlPath, "fixture_change.xml");
            var message = _deserializer.Deserialize <fixture_change>(stream);

            TestData.FillMessageTimestamp(message);
            message.SportId = URN.Parse("sr:sport:1000");
            _validator.Validate(message);
            var entity = _mapper.MapFixtureChange <ICompetition>(message, new [] { TestData.Culture }, null);

            Assert.IsNotNull(entity, "entity should not be a null reference");
        }