Esempio n. 1
0
        public void Get_Category()
        {
            //Arrage
            TResult <List <McpCategory> > expectedResponse = new TResult <List <McpCategory> >
            {
                data = new List <McpCategory>
                {
                    new McpCategory {
                        Category = "wistron_app", Category_Name = "wistron_app"
                    }
                },
                Rtncode = FaultInfoRcConstants.OK,
                RtnMsg  = "OK"
            };

            _appListService.GetCategory().Returns(new List <McpCategory> {
                new McpCategory
                {
                    Category      = "wistron_app",
                    Category_Name = "wistron_app"
                }
            });

            //Act
            TResult <List <McpCategory> > actualResponse = _targetObj.GetCategory();

            //Assert
            Assert.AreEqual(expectedResponse.Rtncode, actualResponse.Rtncode);
            Assert.AreEqual(expectedResponse.RtnMsg, actualResponse.RtnMsg);
            Assert.AreEqual(expectedResponse.data.Count(), actualResponse.data.Count());
        }
 public void Test_GetCategory()
 {
     _targetObj.GetCategory();
 }
Esempio n. 3
0
 public TResult <List <McpCategory> > GetCategory()
 {
     return(TResult <List <McpCategory> > .OK(_appListService.GetCategory(), "OK"));
 }