public PolicyResponse CreatePolicy(PolicyRequest policyRequest) { TSeg_Polizas policy = PolicyMapper.TransformPolicyRequestToTSegPoliza(policyRequest); TSeg_Polizas policyOut = PolicyDomainService.CreatePolicy(policy); return(policyOut != null?PolicyMapper.TransformTSegPolizaToPolicyResponse(policyOut) : null); }
public PolicyProcessor(PolicyMiner policyMiner, PolicyValidator policyValidator, PolicyMapper policyMapper, ResponseMapper responseMapper, PolicySender policySender) { _policyMiner = policyMiner; _policyMapper = policyMapper; _policyValidator = policyValidator; _policySender = policySender; _responseMapper = responseMapper; }
protected override void ParseArgs(string[] args) { var parsedArgs = ArgumentParser.ParseUpdate(args); treeish = (string)parsedArgs["treeish"]; verbose = (bool)parsedArgs["verbose"]; policy = PolicyMapper.GetLocalChangesPolicy(parsedArgs); }
public void Map() { var policyMapper = new PolicyMapper(); var policy = new Policy(); var policyModel = policyMapper.Map(policy); Assert.IsInstanceOfType(policyModel, typeof(PolicyModel)); }
protected override void ParseArgs(string[] args) { Helper.RemoveOldKey(ref args, "-n", Log); var parsedArgs = ArgumentParser.ParseUpdateDeps(args); configuration = (string)parsedArgs["configuration"]; mergedBranch = (string)parsedArgs["merged"]; localBranchForce = (bool)parsedArgs["localBranchForce"]; verbose = (bool)parsedArgs["verbose"]; policy = PolicyMapper.GetLocalChangesPolicy(parsedArgs); }
public void Setup() { _policy = new Policy { OwnerName = "Bob", PolicyNumber = "7" }; _policyModel = new PolicyModel(); _policyMapper = new PolicyMapper(); }
public int UpdatePolicy(PolicyRequest policyRequest) { try { TSeg_Polizas policy = PolicyMapper.TransformPolicyRequestToTSegPoliza(policyRequest); PolicyDomainService.UpdatePolicy(policy); return(1); } catch (Exception e) { return(-1); } }
public Response Process(SessionActivity sessionActivity) { var policyMiner = new PolicyMiner(); var policy = policyMiner.Mine(sessionActivity); var policyMapper = new PolicyMapper(); var policyModel = policyMapper.Map(policy); var policySender = new PolicySender(); var responseModel = policySender.Send(policyModel); var responseMapper = new ResponseMapper(); var response = responseMapper.Map(responseModel); return(response); }
protected override void ParseArgs(string[] args) { Helper.RemoveOldKey(ref args, "-n", Log); var parsedArgs = ArgumentParser.ParseGet(args); module = (string)parsedArgs["module"]; if (string.IsNullOrEmpty(module)) { throw new CementException("You should specify the name of the module"); } treeish = (string)parsedArgs["treeish"]; configuration = (string)parsedArgs["configuration"]; mergedBranch = (string)parsedArgs["merged"]; verbose = (bool)parsedArgs["verbose"]; policy = PolicyMapper.GetLocalChangesPolicy(parsedArgs); }
public void Setup() { _policy = new Policy(); _policyMapper = new PolicyMapper(); }
public PolicyResponse ReadPolicyById(long id) { TSeg_Polizas poliza = PolicyDomainService.ReadPolicyById(id); return(poliza != null?PolicyMapper.TransformTSegPolizaToPolicyResponse(poliza) : null); }
public List <PolicyResponse> ReadPolicies() { List <TSeg_Polizas> policies = PolicyDomainService.ReadPolicies(); return(policies.Count > 0 ? PolicyMapper.TransformTSegPolizasToPolicyResponseList(policies) : new List <PolicyResponse>()); }
public override void Setup() { _policy = new Policy(); _policyMapper = new PolicyMapper(); }