public void CanMapFieldDoubleValue()
        {
            ModelFieldMapping       fieldMapping    = new ModelFieldMapping("DoubleValue", typeof(double));
            ModelProperties <Model> modelProperties = new ModelProperties <Model>();
            string message;

            Assert.That(fieldMapping.CanMapField(modelProperties, out message), Is.True);
            Assert.That(message, Is.Null.Or.Empty);
        }
        public void CanMapFieldDouble()
        {
            ModelFieldMapping       fieldMapping    = new ModelFieldMapping("Value", typeof(double));
            ModelProperties <Model> modelProperties = new ModelProperties <Model>();
            string message;

            Assert.That(fieldMapping.CanMapField(modelProperties, out message), Is.False);
            Assert.That(message, Is.StringContaining("'Value'").And.StringContaining("Int32").And.StringContaining("Double"));
        }
        public void ResolveValue()
        {
            ModelFieldMapping fieldMapping = new ModelFieldMapping("Sample", typeof(DateTime));

            string todayUtc = PersistenceHelper.ConvertToString(DateTime.Today.ToUniversalTime());
            Model  model    = new Model {
                Id = 100, Sample = DateTime.Today
            };

            ModelProperties <Model> modelProperties = new ModelProperties <Model>();

            string value;

            Assert.That(fieldMapping.TryResolveValue(modelProperties, model, out value), Is.True);
            Assert.That(value, Is.EqualTo(todayUtc));
        }
        public void ReadWrite()
        {
            ModelFieldMapping fieldMapping = new ModelFieldMapping("Sample", typeof(DateTime));

            Assert.That(fieldMapping.CanWrite, Is.True);
        }