コード例 #1
0
        public async Task ReturnSubjectsListViewModel()
        {
            var handler = new GetAllSubjectsQueryHandler(Context);

            var result = await handler.Handle(new GetAllSubjectsQuery(), CancellationToken.None);

            Assert.IsInstanceOf(typeof(SubjectsListViewModel), result);
        }
コード例 #2
0
        public async Task ReturnCorrectSubjectsAmount()
        {
            var handler = new GetAllSubjectsQueryHandler(Context);

            var result = await handler.Handle(new GetAllSubjectsQuery(), CancellationToken.None);

            Assert.AreEqual(result.Subjects.Count, 2);
        }