public void Enable_Or_DisableApp_Is_Updated() { //Arrage TResult <bool> expectedResponse = new TResult <bool> { data = true, Rtncode = FaultInfoRcConstants.OK, RtnMsg = "OK" }; _appListService.CheckAppOsStatus(Arg.Any <string>(), Arg.Any <int>()).Returns(_alreadyEnabled); _appListService.EnableOrDisableApp(Arg.Any <string>(), Arg.Any <string>()).Returns(true); //Act TResult <bool> actualResponse = _targetObj.EnableOrDisableApp(_appListItem); //Assert Assert.AreEqual(expectedResponse.data, actualResponse.data); Assert.AreEqual(expectedResponse.Rtncode, actualResponse.Rtncode); Assert.AreEqual(expectedResponse.RtnMsg, actualResponse.RtnMsg); }
public IActionResult EnableOrDisableApp([FromRoute] string appId, [FromRoute] string appOsId) { TResult <bool> response = _appBiz.EnableOrDisableApp(appId, appOsId); return(Json(response)); }