public void InitializeTest()
        {
            Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
            this.tracker = new IssueTracker();

            this.issue1 = new Issue(
                "Not possible to practise in judge.", 
                "Judge system is not working. Not possible to log in.", 
                IssuePriority.High, 
                new List<string> { "judge", "softuni" });

            this.issue2 = new Issue(
                "Not possible to practise in judge, again.", 
                "Judge system is not working, again. Not possible to log in.", 
                IssuePriority.Low, 
                new List<string> { "judge", "softuni" });

            this.user1 = new User("Helen", "0123");
            this.user2 = new User("Gosho", "0124");

            this.comment1 = new Comment(
                this.user2, 
                "The system is not working from yesterday, but they made new website and it will take a while till it starts working correctly.");
            this.comment2 = new Comment(this.user1, "Ok, thanks. I heard of that. Hope soon can practice, again.");

            this.issue1.Comments = new List<Comment> { this.comment1, this.comment2 };
        }
Exemplo n.º 2
0
        public void RemoveIssue(Issue issue)
        {
            this.IssueByUsername[this.CurrentUser.Username].Remove(issue);
            foreach (var tag in issue.Tags)
            {
                this.IssuesByTag[tag].Remove(issue);
            }

            this.IssuesById.Remove(issue.Id);
        }
Exemplo n.º 3
0
        public void RemoveIssue(Issue issue)
        {
            this.UserName_Issue[this.CurrentUser.UserName].Remove(issue);
            foreach (var tag in issue.Tags)
            {
                this.TagIssue[tag].Remove(issue);
            }

            this.IssueId_Issue.Remove(issue.Id);
        }
Exemplo n.º 4
0
        public int AddIssue(Issue issue)
        {
            issue.Id = this.NextIssueId;
            this.IssuesById.Add(issue.Id, issue);
            this.NextIssueId++;
            this.IssuesByUsername[this.CurrentLoggedUser.Username].Add(issue);
            foreach (var tag in issue.Tags)
            {
                this.TagsIssues[tag].Add(issue);
            }

            return issue.Id;
        }
Exemplo n.º 5
0
        public int AddIssue(Issue issue)
        {
            issue.Id = this.nextIssueId;
            this.IssueId_Issue.Add(issue.Id, issue);
            this.nextIssueId++;
            this.UserName_Issue[this.CurrentUser.UserName].Add(issue);
            foreach (var tag in issue.Tags)
            {
                this.TagIssue[tag].Add(issue);
            }

            return issue.Id;
        }
        public void InitializeTest()
        {
            Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
            this.tracker = new IssueTracker();

            this.issue1 = new Issue(
                "Not possible to practise in judge.",
                "Judge system is not working. Not possible to log in.",
                IssuePriority.High,
                new List<string> { "judge", "softuni" });

            this.user1 = new User("Helen", "0123");

            this.comment1 = new Comment(this.user1, "Can someone answer, please.");
            this.comment2 = new Comment(this.user1, "There is still no answer :(");

            this.issue1.Comments = new List<Comment> { this.comment1, this.comment2 };
        }