public StudentGroupServiceAsyncTests()
        {
            this.service = new CommentsServiceAsync();

            service.AddAsync(new Comments
            {
                Text = "Tasty!"
            }).Wait();

            service.AddAsync(new Comments
            {
                Text = "Delisious!"
            }).Wait();
        }
Exemplo n.º 2
0
        public StudentGroupServiceAsyncTests()
        {
            this.service = new CommentsServiceAsync();

            service.AddAsync(new Comments
            {
                Text = "Tasty!"
            }).Wait();

            service.AddAsync(new Comments
            {
                Text = "Delisious!"
            }).Wait();
        }
Exemplo n.º 3
0
        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);
        }