示例#1
0
        public void ShouldBeAbleToCreateQuestionWithTag()
        {
            string questionText = "What is the use of 'var' key word?";
            Tag csharpTag = new Tag("C#");
            Tag javaTag = new Tag("Java");

            User user = new User("shanu", "shanu", "*****@*****.**");
            Question question = new Question(questionText,user);
            question.AddTags(csharpTag);
            question.AddTags(javaTag);

            Assert.AreEqual(csharpTag, question.Tags[0]);
            Assert.AreEqual(javaTag, question.Tags[1]);
        }
示例#2
0
 public virtual void AddTags(Tag tag)
 {
     tags.Add(tag);
 }