Пример #1
0
        public void CreateForMap_WithNonEmptyMap_CreatesMapperWhichMapsFieldsCorrectly()
        {
            var map = new SimpleMap <TestDataClass>();

            map.AddMapping(0, TestDataClass.PropertyNameFieldA);
            map.AddMapping(1, TestDataClass.PropertyNameFieldB);

            var result = _sut.CreateForMap(map);

            var mapped = result.Map(CreateTokenStreamWithDelimiter("A", "B")).ToArray();

            Assert.That(mapped, Has.Length.EqualTo(1));
            AssertTestDataClass(mapped[0], "A", "B");
        }