public void GetModuleByID() { GetModuleRequest request = new GetModuleRequest { ModuleID = "5" }; GetModuleResponse response = ModuleDataManager.GetModuleByID(request); Assert.IsTrue(response.Module.Id == "Tony"); }
public GetModuleResponse Get(GetModuleRequest request) { GetModuleResponse response = new GetModuleResponse(); try { if (string.IsNullOrEmpty(request.UserId)) { throw new UnauthorizedAccessException("ModuleDD:Get()::Unauthorized Access"); } response = ModuleDataManager.GetModuleByID(request); response.Version = request.Version; } catch (Exception ex) { CommonFormatter.FormatExceptionResponse(response, base.Response, ex); string aseProcessID = ConfigurationManager.AppSettings.Get("ASEProcessID") ?? "0"; Common.Helper.LogException(int.Parse(aseProcessID), ex); } return(response); }