public void ApplyPropertyPathWithPosPostfix()
        {
            var applier = new ListIndexAsPropertyPosColumnNameApplier();

            var mapper = new Mock<IListPropertiesMapper>();
            var idxMapper = new Mock<IListIndexMapper>();
            mapper.Setup(x => x.Index(It.IsAny<Action<IListIndexMapper>>())).Callback<Action<IListIndexMapper>>(
                x => x.Invoke(idxMapper.Object));
            var path = new PropertyPath(null, ForClass<MyClass>.Property(p => p.Numbers));

            applier.Apply(path, mapper.Object);
            idxMapper.Verify(km => km.Column(It.Is<string>(s => s == "NumbersPos")));
        }
Example #2
0
        public void ApplyPropertyPathWithPosPostfix()
        {
            var applier = new ListIndexAsPropertyPosColumnNameApplier();

            var mapper    = new Mock <IListPropertiesMapper>();
            var idxMapper = new Mock <IListIndexMapper>();

            mapper.Setup(x => x.Index(It.IsAny <Action <IListIndexMapper> >())).Callback <Action <IListIndexMapper> >(
                x => x.Invoke(idxMapper.Object));
            var path = new PropertyPath(null, ForClass <MyClass> .Property(p => p.Numbers));

            applier.Apply(path, mapper.Object);
            idxMapper.Verify(km => km.Column(It.Is <string>(s => s == "NumbersPos")));
        }