コード例 #1
0
            protected override void SharedContext()
            {
                employeeInfo = new EmployeeInfo { FirstName = "Jim", LastName = "Jones", Email = "[email protected]" };
                getNewEmployeeInfo = MockRepository.GenerateMock<IGetNewEmployeeInfo>();

                Employee newEmployee = new Employee("Bob", "Jones", "[email protected]");
                getEmployeeManager = MockRepository.GenerateMock<IGetEmployeeManager>();
                getEmployeeManager.Stub(g => g.GetManagerFor(null)).IgnoreArguments().Return(newEmployee);

                appController = MockRepository.GenerateMock<IApplicationController>();
            }
コード例 #2
0
 public void AddNewEmployeeRequested(IGetNewEmployeeInfo getNewEmployeeInfo)
 {
     getNewEmployeeInfo.Run();
     ShowEmployeeHierarchy();
 }
コード例 #3
0
 public AddNewEmployeeService(IGetNewEmployeeInfo getNewEmployeeInfo, IGetEmployeeManager getEmployeeManager, IEventPublisher eventPublisher)
 {
     GetNewEmployeeInfo = getNewEmployeeInfo;
     GetEmployeeManager = getEmployeeManager;
     EventPublisher = eventPublisher;
 }
コード例 #4
0
 public AddNewEmployeeService(IGetNewEmployeeInfo getNewEmployeeInfo, IGetEmployeeManager getEmployeeManager)
 {
     GetNewEmployeeInfo = getNewEmployeeInfo;
     GetEmployeeManager = getEmployeeManager;
 }