コード例 #1
0
        public void UpdateForSave_ShouldSetModifiedTime()
        {
            var dataModel = new Post();

            var theDate = DateTime.Now;
            dataModel.UpdateForSave(theDate);

            Assert.That(dataModel.ModifiedDate, Is.EqualTo(theDate));
        }
コード例 #2
0
        public void UpdateForSave_ShouldSetCreatedTime_WhenIdNotSet()
        {
            var dataModel = new Post();

            var theDate = DateTime.Now;
            dataModel.UpdateForSave(theDate);

            Assert.That(dataModel.CreatedDate, Is.EqualTo(theDate));
        }