Exemplo n.º 1
0
        public void TermController_GetTerm_Returns_Null_On_InValidTermId()
        {
            //Arrange
            var mockDataService = new Mock <IDataService>();

            mockDataService.Setup(ds => ds.GetTerm(Constants.TERM_InValidTermId)).Returns(MockHelper.CreateEmptyTermReader());

            var termController = new TermController(mockDataService.Object);

            //Act
            Term term = termController.GetTerm(Constants.TERM_InValidTermId);

            //Assert
            Assert.IsNull(term);
        }