Exemplo n.º 1
0
 public void AddTest()
 {
     var text = Guid.NewGuid().ToString();
     var NewComment = new Comments
     {
         Text = text
     };
     var AddedComment = service.Add(NewComment);
     Assert.IsNotNull(AddedComment);
     Assert.IsTrue(AddedComment.Id > 0);
     Assert.AreEqual(AddedComment.Text, text);
 }
        public void AddTest()
        {
            var name = Guid.NewGuid().ToString();

            var newGroup = new Comments
            {
                Text = name
            };

            var addedGroupTask = service.AddAsync(newGroup);

            var addedGroup = addedGroupTask.Result;

            Assert.IsNotNull(addedGroup);
            Assert.IsTrue(addedGroup.Id > 0);
            Assert.AreEqual(addedGroup.Text, name);
        }