public void TestGetMyIssues_NoUser()
        {
            IIssueTracker tracker = new FakeIssueTrackerWithNoUser();

            string actualResult   = tracker.GetMyIssues();
            string expectedResult = "There is no currently logged in user";

            Assert.AreEqual(expectedResult, actualResult,
                            "GetMyIssues() does not show proper output in case of no logged in user.");
        }
        public void TestRegisterUser_PasswordsDoNotMatch()
        {
            IIssueTracker tracker         = new FakeIssueTrackerWithNoUser();
            string        username        = "******";
            string        password        = "******";
            string        confirmPassword = "******";

            string result = tracker.RegisterUser(username, password, confirmPassword);

            Assert.AreEqual(result, "The provided passwords do not match",
                            "RegisterUser() does not return proper outcome in case of pasword mismatch.");
        }
        public void TestRegisterUser_ExistingUser()
        {
            IIssueTracker tracker         = new FakeIssueTrackerWithNoUser();
            string        username        = "******";
            string        password        = "******";
            string        confirmPassword = "******";

            tracker.RegisterUser(username, password, confirmPassword);
            string result = tracker.RegisterUser(username, password, confirmPassword);

            Assert.AreEqual(result, "A user with username pesho already exists",
                            "RegisterUser() does not return proper outcome in case of duplicate user.");
        }
        public void TestCreateIssue_NoLoggedInUser()
        {
            IIssueTracker tracker = new FakeIssueTrackerWithNoUser();

            string        title       = "title";
            string        description = "description";
            IssuePriority priority    = (IssuePriority)Enum.Parse(typeof(IssuePriority), "low");

            string[] tags = new string[] { "new", "issue", "another" };

            string result = tracker.CreateIssue(title, description, priority, tags);

            Assert.AreEqual(result, "There is no currently logged in user",
                            "CreateIssue() does not return proper outcome in case of no logged in user.");
        }