コード例 #1
0
        public void AlwaysPassedTest()
        {
            YouTubePage page   = new YouTubePage("https://www.youtube.com/watch?v=UKKYpdWPSL8");
            string      author = page.GetAuthorName();

            JiraInfoProvider.SaveParameter("Author", author);
            JiraInfoProvider.SaveParameter("Title", page.GetVideoTitle());

            Assert.AreEqual(author, "EPAM Systems Global");
        }
コード例 #2
0
        public ActionResult Show(int categoryId, int pageId)
        {
            YouTubePage youtubepage           = YouTubePage.Find(pageId);
            Category    category              = Category.Find(categoryId);
            Dictionary <string, object> model = new Dictionary <string, object>();

            model.Add("youtubepage", youtubepage);
            model.Add("category", category);
            return(View(model));
        }
 public CheckAuthorAndTitleInYoutubeVideo(ScenarioContext scenarioContext)
 {
     if (scenarioContext == null)
     {
         throw new ArgumentNullException("scenarioContext");
     }
     this.scenarioContext = scenarioContext;
     screenshoter         = new Screenshoter(scenarioContext, BrowserContainer.GetBrowser(scenarioContext.ScenarioInfo.Title).Driver);
     page = new YouTubePage(BrowserContainer.GetBrowser(scenarioContext.ScenarioInfo.Title));
 }
コード例 #4
0
        public void AlwaysFailedTest()
        {
            YouTubePage page   = new YouTubePage("https://www.youtube.com/watch?v=sU4i4DTr1HQ");
            string      author = page.GetAuthorName();
            string      title  = page.GetVideoTitle();

            JiraInfoProvider.SaveParameter("Author", author);
            JiraInfoProvider.SaveParameter("Title", title);

            Screenshoter.Instance.TakeScreenshot();

            Assert.AreEqual("Atlassian", author);
        }
コード例 #5
0
        public ActionResult Create(int categoryId, string youtubepageTitle, string youtubepageDescription, string youtubepageLink)
        {
            Dictionary <string, object> model = new Dictionary <string, object>();
            Category    foundCategory         = Category.Find(categoryId);
            YouTubePage newYouTubePage        = new YouTubePage(youtubepageTitle, youtubepageDescription, youtubepageLink);

            newYouTubePage.Save();
            foundCategory.AddYouTubePage(newYouTubePage);
            List <YouTubePage> categoryYouTubePages = foundCategory.YouTubePages;

            model.Add("youtubepages", categoryYouTubePages);
            model.Add("category", foundCategory);
            return(View("Show", model));
        }
コード例 #6
0
 public ActionResult DeleteAll()
 {
     YouTubePage.ClearAll();
     return(View());
 }
        public void ThenViewsQuantityForTheBananaSongVideoIsMoreThan(int expectedViews)
        {
            YouTubePage youTubePage = new YouTubePage();

            Assert.IsTrue(youTubePage.ValidateQuantityOfVideoViews(expectedViews));
        }