예제 #1
0
        public void GetTea_ShouldNotFindTea()
        {
            var controller = new TeasController();

            var result = controller.GetTea(1000);

            Assert.IsInstanceOfType(result, typeof(NotFoundResult));
        }
예제 #2
0
        public void GetTeaTest()
        {
            var controller = new TeasController();

            var result = controller.GetTea(1) as OkNegotiatedContentResult <Tea>;

            Assert.IsNotNull(result);
            Assert.AreEqual(testdb.getTea(1).Name, result.Content.Name);
        }