Example #1
0
        public async Task GetCourseAsync_CreatesMailingAndReturnsIt()
        {
            //arrange
            var model = new GetMailingModel()
            {
                Name = "probability theory"
            };

            //act
            var mail1 = await _service.GetCourseAsync(1);

            var mail2 = await _service.GetCourseAsync(model);

            // assert
            Assert.IsTrue(_mailingsDb.ContainsValue(mail1));
            Assert.IsTrue(_mailingsDb.ContainsKey(mail1.MailingId));
            Assert.IsTrue(_mailingsDb.ContainsValue(mail2));
            Assert.IsTrue(_mailingsDb.ContainsKey(mail2.MailingId));
        }