예제 #1
0
            public void Fill(CreateDiscussionPage createDiscussionPage)
            {
                createDiscussionPage.Title = Guid.NewGuid().ToString();
                createDiscussionPage.SelectCategory(_testDefaults.ExampleCategory);
                createDiscussionPage.Body = _body;

                createDiscussionPage.CreateDiscussion();
            }
예제 #2
0
        public Discussion CreateDiscussion(Discussion.DiscussionBuilder builder)
        {
            var newDiscussionButton = WebDriver.FindElement(By.ClassName("createtopicbutton"));

            newDiscussionButton.Click();

            var createDisucssionPage = new CreateDiscussionPage(WebDriver);

            builder.Fill(createDisucssionPage);
            createDisucssionPage.CreateDiscussion();

            return(new Discussion(WebDriver));
        }
예제 #3
0
        public void DiscussionDetailsAreDisplayedAfterCreation()
        {
            LoggedInUserShell    shell = Login();
            CreateDiscussionPage createDiscussionPage = shell.ClickNewDiscussionButton();

            string title       = "Dicussion Title by DummyUserName";
            string category    = "Example Category";
            string description = "This is my first discussion";

            createDiscussionPage.Title       = title;
            createDiscussionPage.Category    = category;
            createDiscussionPage.Description = description;

            DiscussionPage discussionPage = createDiscussionPage.ClickCreateDiscussion();

            Assert.AreEqual(title, discussionPage.Title);
            Assert.AreEqual(category, discussionPage.Category);
            Assert.AreEqual(description, discussionPage.Description);
        }