Esempio n. 1
0
        public void FillField_ValidValue_PopulatesField()
        {
            var newItem = _database.GetItem(TestingConstants.ToDate.NewItemId);

            var dt             = DateTime.UtcNow;
            var dateValue      = dt.ToString("F");
            var dateFieldValue = dt.ToString("yyyyMMddTHHmmss");

            using (new EditContext(newItem))
            {
                _sut.FillField(_dataMap, ref newItem, dateValue);
            }

            var field = newItem.Fields[TestingConstants.ToDate.ToFieldName];

            Assert.AreEqual(dateFieldValue, field.Value);
        }