Esempio n. 1
0
        public void PutTags(int id)
        {
            var updateEntity = _fixture.Build <TagModel>().With(x => x.Id, id).Create();

            // Act
            var controller = new TagsController(_logger, _entityBL, _commonBL);
            var result     = controller.PutTags(id, updateEntity) as OkNegotiatedContentResult <JsonResponse>;

            // Assert

            var resultEntity = result.Content.Data as Tag;

            Assert.That(resultEntity.LastActivityDate, Is.Not.EqualTo(DateTime.MinValue));
            Assert.That(resultEntity.Id, Is.EqualTo(1)); // hasn't changed
        }