public void Test_GetAvailableApp()
        {
            //Arrange
            string            sqlAppendStr = @" Order BY app.IsTop DESC, appOs.LastUpdateDT DESC ";
            DynamicParameters parameters   = new DynamicParameters();

            parameters.Add(@"@Uid", "", DbType.String);

            //Act
            _targetObj.GetAvailableApp(sqlAppendStr, parameters);
        }
Ejemplo n.º 2
0
        public void Get_Available_App_List()
        {
            //Arrange
            //Html Select tag value   All、1= 內部(wistron App)、2= 外部(External Resources)
            string companyApp = "1";
            // 1 = IOS, 2 =Android
            byte osType = 1;
            TResult <List <AvailableAppListViewModel> > expectedResponse = new TResult <List <AvailableAppListViewModel> >
            {
                data    = _availableAppListViewModel,
                Rtncode = FaultInfoRcConstants.OK,
                RtnMsg  = "OK"
            };

            _appListService.GetAvailableApp(Arg.Any <string>(), Arg.Any <DynamicParameters>()).Returns(_availableAppLists);

            //Act
            TResult <List <AvailableAppListViewModel> > actualResponse = _targetObj.GetAvailableAppList(companyApp, osType);

            //Assert
            Assert.AreEqual(expectedResponse.Rtncode, actualResponse.Rtncode);
            Assert.AreEqual(expectedResponse.RtnMsg, actualResponse.RtnMsg);
        }