Exemple #1
0
        public void TestCategory()
        {
            service.Setup(x => x.GetCategory(categories[0])).Returns(new ResponseModel <Category> {
                Error = false, Entity = categories[0]
            });

            var controller = new ValuesController(service.Object);
            var result     = controller.GetCategory(categories[0]).Entity;

            Assert.IsTrue(result.CreateDateTime.ToShortDateString() == DateTime.Now.ToShortDateString());
            Assert.IsFalse(result.IsPinned == false);
        }