Example #1
0
        public ForeignStudent GetForeignStudent(string id)
        {
            var errors     = new List <string>();
            var repository = new ForeignStudentRepository();
            var service    = new ForeignStudentService(repository);

            return(service.GetForeignStudent(id, ref errors));
        }
        public void ForeignStudentErrorTest()
        {
            //// Arranage
            var errors                = new List <string>();
            var mockRepository        = new Mock <IForeignStudentRepository>();
            var foreignStudentService = new ForeignStudentService(mockRepository.Object);

            //// Act
            foreignStudentService.GetForeignStudent(null, ref errors);

            //// Assert
            Assert.AreEqual(1, errors.Count);
        }