Esempio n. 1
0
        static void Main(string[] args)
        {
            service = Windsor.Container.Resolve<StudentService>();

            Console.WriteLine("SERVICE REPOSITORY");

            Console.WriteLine("Current students:");
            ListCurrentStudents();

            Console.WriteLine("Creating new students");
            service.CreateStudents();

            Console.WriteLine("Current students:");
            ListCurrentStudents();

            Console.WriteLine("Promoting all classes");
            service.PromoteAllClasses();

            Console.WriteLine("Current students:");
            ListCurrentStudents();

            Console.WriteLine("Press any key to exit");
            Console.ReadKey();
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            service = Windsor.Container.Resolve <StudentService>();

            Console.WriteLine("SERVICE REPOSITORY");

            Console.WriteLine("Current students:");
            ListCurrentStudents();

            Console.WriteLine("Creating new students");
            service.CreateStudents();

            Console.WriteLine("Current students:");
            ListCurrentStudents();

            Console.WriteLine("Promoting all classes");
            service.PromoteAllClasses();

            Console.WriteLine("Current students:");
            ListCurrentStudents();

            Console.WriteLine("Press any key to exit");
            Console.ReadKey();
        }
 public void SetUp()
 {
     repositoryWithMock = new Mock<IStudentServiceRepository>();
     serviceWithMock = new StudentService(repositoryWithMock.Object);
 }