public void SaveMasterConfiguration()
        {
            MasterConfigurationBO objMasterConfigurationBO = new MasterConfigurationBO();

            objMasterConfigurationBO.MinPasswordLength = 8;
            objMasterConfigurationBO.RequireNumberInPassword = true;
            objMasterConfigurationBO.RequireSpecialCharacterInPassword = true;
            objMasterConfigurationBO.MaxPasswordLife = 100;
            objMasterConfigurationBO.MaxLogonRetry = 2;
            objMasterConfigurationBO.PasswordHistoryCount = 2;
            objMasterConfigurationBO.AllowReusePasswordFromHistory = false;
            objMasterConfigurationBO.CreatedBy = "Paresh Rao";
            objMasterConfigurationBO.CreatedOn = DateTime.Now;
            //Optional Fields
            objMasterConfigurationBO.ModifiedBy = "Ravi Keshwani";
            objMasterConfigurationBO.ModifiedOn = DateTime.Now;
            objMasterConfigurationBO.IPAddressOfLastAction = "10.7.200.300";
            objMasterConfigurationBO.DefaultEmailAddress = "*****@*****.**";
            objMasterConfigurationBO.OutgoingEmailServer = "10.10.10.10";
            objMasterConfigurationBO.SenderMailAddress = "*****@*****.**";
            objMasterConfigurationBO.EmailAccountUserName = "******";
            objMasterConfigurationBO.EmailAccountUserPassword = "******";

            MasterConfigurationBLL objMasterConfigBL = new MasterConfigurationBLL();
            int returnVal = objMasterConfigBL.SaveMasterConfiguration(objMasterConfigurationBO);

            Assert.AreEqual(1,returnVal, "It should return 1");
        }
        public void GetMasterConfiguration()
        {
            MasterConfigurationBLL objMasterConfigBL = new MasterConfigurationBLL();
            MasterConfigurationBO mastConfigBO = objMasterConfigBL.GetMasterConfiguration();

            if (mastConfigBO != null)
            {
                string returnString = mastConfigBO.EmailAccountUserName;
            }

            Assert.AreNotEqual(null, mastConfigBO, "It should not return null");
        }
 /// <summary>
 /// Gets master configuration data
 /// </summary>
 /// <returns></returns>
 public MasterConfigurationViewModel GetMasterConfiguration()
 {
     Log4NetLogger.Info("Services : In GetMasterConfiguration");
     var masterConfigurationBLL = new MasterConfigurationBLL();
     Mapper.CreateMap<MasterConfigurationBO, MasterConfigurationViewModel>();
     return Mapper.Map(masterConfigurationBLL.GetMasterConfiguration(), new MasterConfigurationViewModel());
 }
        /// <summary>
        /// Saves master configuration
        /// </summary>
        /// <param name="masterConfigurationViewModel"></param>
        /// <returns></returns>
        public int SaveMasterConfiguration(MasterConfigurationViewModel masterConfigurationViewModel)
        {
            var masterConfigurationBLL = new MasterConfigurationBLL();
            Mapper.CreateMap<MasterConfigurationViewModel, MasterConfigurationBO>();

            var masterConfigurationBO = new MasterConfigurationBO();
            masterConfigurationBO = Mapper.Map<MasterConfigurationViewModel, MasterConfigurationBO>(masterConfigurationViewModel);
            return masterConfigurationBLL.SaveMasterConfiguration(masterConfigurationBO);
        }
 public void SetFPApplication(Common.FPApplication fpApplication)
 {
     this.FPApplication = fpApplication;
     this._masterConfigurationBLL = new MasterConfigurationBLL();
 }