public void WizardServicesTest()
        {
            IWizardService service = new WizardServices();

            var org = new Organisation()
            {
                OrganisationName = "testOrg",
                UserName         = "******",
                Password         = "******",
                Address          = "111 test st, sydney, nsw, 2000",
                Country          = CountryType.Australia,
                Contact          = "1111111111"
            };

            org.Users = new List <User>
            {
                new User {
                    FirstName = "PFName", LastName = "PLName", Email = "*****@*****.**", Contact = "111"
                },
                new User {
                    FirstName = "SFName", LastName = "SLName", Email = "*****@*****.**", Contact = "222"
                },
            };

            org.Questionnaire = new Questionnaire()
            {
                FrontendTech = "CSS",
                HearFrom     = "facebook",
                IsJave       = false,
                IsChinese    = false,
                IsCSharp     = true,
                HtmlVersion  = 5,
                Comment      = "TEST"
            };


            try
            {
                service.SaveWizard(org);
            }
            catch (Exception e)
            {
                Assert.Fail();
            }
        }
        public JsonResult SaveSteps(WizardViewModel model)
        {
            var organisation = model.Organisation;

            //convert the ef relationship
            organisation.Questionnaire = model.Questionnaire;
            if (organisation.Questionnaire.HtmlVersion == null)
            {
                organisation.Questionnaire.HtmlVersion = 0;
            }
            model.PrimaryUser.Organisation   = organisation;
            model.SecondaryUser.Organisation = organisation;
            organisation.Users = new List <User>()
            {
                model.PrimaryUser, model.SecondaryUser
            };


            IWizardService service = new WizardServices();

            service.SaveWizard(organisation);

            return(Json(new { success = true }));
        }