Пример #1
0
        public void Insert_AppName_Is_Successful()
        {
            //Arrange
            TResult <ResponseAppNameCreate> expectedResponse = new TResult <ResponseAppNameCreate>
            {
                Data = new ResponseAppNameCreate
                {
                    IsSuccessful = true,
                    AppID        = "4beedc78-0d31-496e-bb9c-81a79c9c6bc6"
                },
                Rtncode = FaultInfoRcConstants.OK,
                RtnMsg  = "Test AppName"
            };

            _appListService.AppNameIsExisted(_request.AppName).Returns(false);
            _appListService.GetIsTopAppList().Returns(_inSideOrOutSideApp);
            _appListService.InsertAppName(Arg.Any <WisAppList>(), Arg.Any <List <WisAppUserList> >()).Returns(true);
            _appListService.GetDefineGroup(Arg.Any <List <string> >()).Returns(new List <WisDefineGroup>());

            //Act
            TResult <ResponseAppNameCreate> actualResponse = _targetObj.InsertAppName(_request);

            //Assert
            Assert.AreEqual(expectedResponse.Rtncode, actualResponse.Rtncode);
            Assert.AreEqual(expectedResponse.RtnMsg, actualResponse.RtnMsg);
            Assert.AreEqual(expectedResponse.Data.IsSuccessful, actualResponse.Data.IsSuccessful);
        }
 public void Test_GetIsTopAppList()
 {
     _targetObj.GetIsTopAppList();
 }