Пример #1
0
        public void Setup()
        {
            _base = new CallObject();

            var oNode  = new Claim();
            var oNode2 = new Insured();
            var oNode3 = new Vehicle();
            var oNode4 = new Driver();

            _base.Add(oNode);
            oNode.Add(oNode2);
            oNode2.Add(oNode3);
            oNode2.Add(oNode4);

            oNode.SetValue(CallObject.LobCdAttributeName, "WOR");
            oNode.ClaimNumber = "00122345";
            oNode.LossDate    = "12092005";

            oNode2.InsuredName = "Steven Murphy";

            oNode2.SetValue(Address.AddressLine1, "95 Wells Avenue");
            oNode2.SetValue(Address.AddressCity, "Newton");
            oNode2.SetValue(Address.AddressState, "MA");
            oNode2.SetValue(Address.AddressZip, "02459");

            oNode2.PhoneHome = "6178862064";

            oNode3.Make  = "TOYOTA";
            oNode3.Model = "MATRIX";
            oNode3.Vin   = "1234567891011121314";
            oNode3.Year  = "2004";

            oNode4.NameFirst = "Cookie";
            oNode4.NameLast  = " Murphy";

            oNode4.SetValue(Address.AddressLine1, "529 Main Street");
            oNode4.SetValue(Address.AddressCity, "Charlestown");
            oNode4.SetValue(Address.AddressState, "MA");
            oNode4.SetValue(Address.AddressZip, "02129");
            oNode4.SetValue(EntityBase.HomePhoneAttribute, "6178862064");

            _base.Commit();
        }
Пример #2
0
        /// <summary>
        /// NUNIT Tests the add new prebuilt nodes.
        /// </summary>
        [Test] public void TestAddNew()
        {
            Assert.IsTrue(_base.Add("CLAIM/INSURED/VEHICLE/COVERAGE[0]/COVERAGE_TYPE", "COLL"));
            Assert.IsTrue(_base.Add("CLAIM/INSURED/VEHICLE/COVERAGE[0]/DEDUCTIBLE", "500.00"));
            Assert.IsTrue(_base.Add("CLAIM/INSURED/VEHICLE/COVERAGE[1]/COVERAGE_TYPE", "COMP"));
            Assert.IsTrue(_base.Add("CLAIM/INSURED/VEHICLE/COVERAGE[1]/DEDUCTIBLE", "500.00"));
            Assert.IsTrue(_base.Add("CLAIM/INSURED/VEHICLE/COVERAGE[2]/COVERAGE_TYPE", "RENTAL"));
            Assert.IsTrue(_base.Add("CLAIM/INSURED/VEHICLE/COVERAGE[2]/LIMIT", "500.00"));

            Console.WriteLine("{0}", _base);
        }