Beispiel #1
0
        public void Submit_Without_User_Application()
        {
            SolaApplicationService appSvc = new SolaApplicationService();

            appSvc.SubmitToSola();
            Assert.AreEqual(appSvc.app.Status, "No User");
            Assert.IsNull(appSvc.app.SolaId);
            Assert.IsFalse(appSvc.isComplete());
        }
Beispiel #2
0
        public void SubmitApplicationToSola()
        {
            Application app = new Application();

            app.StartDate                = DateTime.Now;
            app.UserId                   = "e911miri";
            app.ContactPerson.Email      = "*****@*****.**";
            app.ContactPerson.DOB        = DateTime.Today;
            app.ContactPerson.Firstname  = "Tomiwa";
            app.ContactPerson.Surname    = "Ijaware";
            app.ContactPerson.Middlename = "Wisdom";
            app.ContactPerson.MobileNo   = "07037290250";
            app.ContactPerson.Addresses.Add(new Address()
            {
                City   = "akure",
                State  = "Ondo",
                Street = "No 1. Mt Gerizm Road",
                PMBNo  = "10"
            });

            //app.Properties.Add(new Property()
            //{
            //    Developed = false,
            //    LandUse = "Smoking"
            //});
            //app.SubmissionDate = DateTime.Now;

            SolaApplicationService SolaAppSvc = new SolaApplicationService();

            SolaAppSvc.app = app;
            SolaAppSvc.save();
            Assert.IsNotNull(SolaAppSvc.getApplicationById(app.Id));
            Assert.AreEqual(app.Id, SolaAppSvc.getApplicationById(app.Id).Id);

            var appTO = SolaAppSvc.SubmitToSola();

            Assert.IsNotNull(appTO);
        }