public string UpdateBoard(Domain.Socioboard.Models.MongoBoards boards)
        {
            try
            {
                DatabaseRepository dbr = new DatabaseRepository();
                if (!string.IsNullOrEmpty(boards.twitterHashTag))
                {
                    TwitterRepository twtrepo = new TwitterRepository();
                    boards.twitterHashTag = twtrepo.AddTwitterHashTag(boards.twitterHashTag, boards.id.ToString());
                }
                if (!string.IsNullOrEmpty(boards.instagramHashTag))
                {
                    InstagramRepository instRepo = new InstagramRepository();
                    boards.instagramHashTag = instRepo.AddInstagramHashTag(boards.instagramHashTag, boards.id.ToString());
                }
                if (!string.IsNullOrEmpty(boards.gplusHashTag))
                {
                    GplusRepository gplusRepo = new GplusRepository();
                    boards.gplusHashTag = gplusRepo.AddGplusHashTag(boards.gplusHashTag, boards.id.ToString());
                }

                dbr.Update <Domain.Socioboard.Models.MongoBoards>(boards);
                return("update");
            }
            catch (Exception)
            {
                return("Issue in board updation");
            }
        }
示例#2
0
        /// <summary>
        /// Performs the playback of actions in this module.
        /// </summary>
        /// <remarks>You should not call this method directly, instead pass the module
        /// instance to the <see cref="TestModuleRunner.Run(ITestModule)"/> method
        /// that will in turn invoke this method.</remarks>
        void ITestModule.Run()
        {
            Mouse.DefaultMoveTime        = 300;
            Keyboard.DefaultKeyPressTime = 100;
            Delay.SpeedFactor            = 1.0;

            // start here
            InstagramRepository repo = InstagramRepository.Instance;

            if (InstagramRepository.Instance.ApplicationUnderTest.Login.AnmeldenInfo.Exists())
            {
                repo.ApplicationUnderTest.Login.Anmelden.Click();
            }
            else
            {
                Report.Info("Button ist nicht da");
            }
        }
示例#3
0
        public InstagramService()
        {
            instagramRepository      = new InstagramRepository();
            LogManager.Configuration = new XmlLoggingConfiguration(AppConfiguration.NLogPath);
            logger = LogManager.GetCurrentClassLogger();

            instaApi = InstaApiBuilder.CreateBuilder()
                       .SetUser(new UserSessionData()
            {
                UserName = AppConfiguration.InstagramApiUserName,
                Password = AppConfiguration.InstagramApiPassword,
            })
                       .Build();

            var logInResult = instaApi.LoginAsync().Result;

            if (logInResult.Succeeded)
            {
                logger.Info("/-----Instagram Service Login Success-----/");
            }
        }