Exemplo n.º 1
0
        public string Apply(Claim claim)
        {
            var result = new StringBuilder();
            if (claim.Contigency) result.AppendLine("Contigency Amount");
            if (claim.Unliquidated) result.AppendLine("Unliquidated Amount");
            if (claim.Undetermined && claim.TotalAmount !=0) result.AppendLine("Undeterminated Amount");

            return result.ToString();
        }
Exemplo n.º 2
0
        private string ApplyRemarks(Claim claim)
        {
            var message = new StringBuilder();
            foreach (var remark in remarks)
            {
                var result = remark.Apply(claim);
                if (!string.IsNullOrEmpty(result))
                    message.AppendLine(result);
            }

            return message.ToString().IsNullOrEmpty() ? "No rules Applied" : message.ToString();
        }
Exemplo n.º 3
0
 public IHttpActionResult Post(Claim claim)
 {
     var result = ApplyRemarks(claim);
     return Ok(result);
 }