Ejemplo n.º 1
0
        public void WithMapper_ValidMapper_Success()
        {
            var reader = new ColumnNameValueReader("ColumnName");
            OneToOneMap <string> propertyMap = Map(t => t.Value);

            Assert.Same(propertyMap, propertyMap.WithReader(reader));

            Assert.Same(reader, propertyMap.CellReader);
        }
Ejemplo n.º 2
0
        public void WithReader_OptionalColumn_Success()
        {
            var innerReader = new ColumnNameValueReader("ColumnName");
            OneToOneMap <string> propertyMap = Map(t => t.Value).MakeOptional();

            Assert.True(propertyMap.Optional);
            Assert.Same(propertyMap, propertyMap.WithReader(innerReader));
            Assert.True(propertyMap.Optional);
            Assert.Same(innerReader, propertyMap.CellReader);
        }
Ejemplo n.º 3
0
        public void WithReader_NullReader_ThrowsArgumentNullException()
        {
            OneToOneMap <string> propertyMap = Map(t => t.Value);

            Assert.Throws <ArgumentNullException>("reader", () => propertyMap.WithReader(null));
        }