Ejemplo n.º 1
0
        public void Id_IsAnyType_CallsTypeFactoryToGetType()
        {
            var map = GetMappings(m => m.Id(x => x.Id));

            TypeFactoryMock.Setup(x => x.GetFor(typeof(Int32))).Returns(new Int64Type());

            var model = ToMappingModel(map);

            Assert.That(model.Identity.MappingType, Is.TypeOf <Int64Type>());
        }
Ejemplo n.º 2
0
        public void Map_IsAnyType_CallsTypeFactoryToGetType()
        {
            var map = GetMappings(m => m.Map(x => x.StringValue));

            TypeFactoryMock.Setup(x => x.GetFor(typeof(string))).Returns(new Int64Type());
            var model = ToMappingModel(map);
            var field = model.Fields.Single();

            Assert.That(field.MappingType, Is.TypeOf <Int64Type>());
        }