Exemple #1
0
        public StudentGroupServiceAsyncTests()
        {
            this.service = new StudentGroupServiceAsync(new AuditManager());

            service.AddAsync(new StudentGroup
            {
                Name = "First group"
            }).Wait();

            service.AddAsync(new StudentGroup
            {
                Name = "Second group"
            }).Wait();
        }
Exemple #2
0
        public void AddTest()
        {
            var name = Guid.NewGuid().ToString();

            var newGroup = new StudentGroup
            {
                Name = name
            };

            var addedGroupTask = service.AddAsync(newGroup);

            var addedGroup = addedGroupTask.Result;

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