public MitchellClaimType FindClaimByClaimNumber(string claimNumber)
        {
            MitchellClaimType objMitchellClaimType = new MitchellClaimType();
            try
            {
                objMitchellClaimType = _entity.MitchellClaimTypes.ToList<MitchellClaimType>().Find(x => x.ClaimNumber == claimNumber);

            }
            catch (Exception ex)
            {
                _claimDatabaseException.ExceptionHandler(ex.Message);
            }
            return objMitchellClaimType;
        }
        //Not sure why objMitchellClaimType.Vehicles object is not able to hold any value
        //Throwing exception object is null
        public List<MitchellClaimType> GetClaims()
        {
            List<MitchellClaimType> claimList = new List<MitchellClaimType>();
            try
            {
               //claimList =  _entity.MitchellClaimTypes.ToList<MitchellClaimType>();
                MitchellClaimType objMitchellClaimType = new MitchellClaimType();
                foreach (MitchellClaimType tempMitchellClaimType in _entity.MitchellClaimTypes.ToList<MitchellClaimType>())
                {
                    objMitchellClaimType = tempMitchellClaimType;
                    objMitchellClaimType.LossInfo = _entity.LossInfoTypes.ToList<LossInfoType>().Where(x => x.ID == tempMitchellClaimType.ID).ToList<LossInfoType>()[0];
                    //objMitchellClaimType.Vehicles = new VehicleInfoType[1];
                   //_entity.VehicleInfoTypes.ToList<VehicleInfoType>().CopyTo(objMitchellClaimType.Vehicles);
                    claimList.Add(objMitchellClaimType);
                }

            }catch(Exception ex)
            {
                _claimDatabaseException.ExceptionHandler(ex.Message);
            }
            return claimList;
        }
 public void UpdateClaim(MitchellClaimType claimType)
 {
     _mitchellClaimDAL.UpdateClaim(claimType);
 }
 public int SaveClaim(MitchellClaimType claim)
 {
     return _mitchellClaimDAL.SaveClaim(claim);
 }
        public int SaveClaim(MitchellClaimType claim)
        {
            int responseStatus = -1;
            MitchellClaimType claimTypeResponse = new MitchellClaimType();
            try
            {
                claimTypeResponse = _entity.MitchellClaimTypes.Add(claim);
                _entity.SaveChanges();

            }
            catch (Exception ex)
            {
                _claimDatabaseException.ExceptionHandler(ex.Message);
            }
            if (claimTypeResponse != null)
            {
                responseStatus = 1;
            }
            return responseStatus;
        }
 public void UpdateClaim(MitchellClaimType claimNumber)
 {
     throw new NotImplementedException();
 }
        public void SetUp()
        {
            _dal = new MitchellClaimDAL();
            _claimService = new MitchellClaimService(_dal);

            _claimType = new MitchellClaimType()
            {
                ClaimNumber = "22c9c23bac142856018ce14a26b6c299",
                ClaimantFirstName = "George",
                ClaimantLastName = "Washington",
                Status = (StatusCode)Enum.Parse(typeof(StatusCode), "OPEN"),
                LossDate = Convert.ToDateTime("2014-07-09T17:19:13.631-07:00"),
                AssignedAdjusterID = Convert.ToInt64("12345"),
                LossInfo = new LossInfoType()
                {
                    CauseOfLoss = (CauseOfLossCode)Enum.Parse(typeof(CauseOfLossCode), "Collision"),
                    ReportedDate = Convert.ToDateTime("2014-07-10T17:19:13.676-07:00"),
                    LossDescription = "Crashed into an apple tree."
                },
                Vehicles = new VehicleInfoType[1]{
                    new VehicleInfoType(){
                            Vin = "1M8GDM9AXKP042788",
                            ModelYear = Convert.ToInt32("2015"),
                            MakeDescription = "Ford",
                            ModelDescription = "Mustang",
                            EngineDescription = "EcoBoost",
                            ExteriorColor = "Deep Impact Blue",
                            LicPlate = "NO1PRES",
                            LicPlateState = "VA",
                            LicPlateExpDate = Convert.ToDateTime("2015-03-10-07:00"),
                            DamageDescription = "Front end smashed in. Apple dents in roof.",
                            Mileage = Convert.ToInt32("1776")
                    }
                },
            };
        }