コード例 #1
0
        public void DeleteFile_AppOsID_Is_Null()
        {
            //Arraange
            TResult <bool> expectedResponse = new TResult <bool>
            {
                data    = false,
                Rtncode = FaultInfoRcConstants.ERR_CODE_FAIL,
                RtnMsg  = "無法刪除實體檔案 因為 AppOsId 為空值"
            };

            _appListItem.AppOSID = null;

            //Act
            TResult <bool> actualResponse = _targetObj.DeleteFile(_appListItem);

            //Assert
            Assert.AreEqual(expectedResponse.data, actualResponse.data);
            Assert.AreEqual(expectedResponse.Rtncode, actualResponse.Rtncode);
            Assert.AreEqual(expectedResponse.RtnMsg, actualResponse.RtnMsg);
        }
コード例 #2
0
        public IActionResult DoDeleteFile([FromBody] AppDeleteRequest request)
        {
            TResult <bool> response = _appBiz.DeleteFile(request.AppId, request.AppOsId);

            return(Json(response));
        }