Beispiel #1
0
        public async Task PassingIncorrectStudentIdTest()
        {
            var obj = new AllStudentsInfoQuery(13);

            var resp = await _allStudentsInfoQuery.Handle(obj) as Results;

            Assert.AreEqual(false, resp.IsSuccessful);

            Assert.AreEqual(null, resp.ResponseMessage);
        }
Beispiel #2
0
        public async Task GetAllStudentInfoTest()
        {
            var obj = new AllStudentsInfoQuery();

            var resp = await _allStudentsInfoQuery.Handle(obj) as Results;

            Assert.IsNotNull(resp.ResponseMessage);

            Assert.AreEqual(resp.IsSuccessful, true);

            Assert.IsInstanceOfType(resp.ResponseMessage,
                                    typeof(IEnumerable <StudentsViewDto>));
        }