public InviteUserHandlerTests() { _invitationRepository = Substitute.For <IInvitationRepository>(); _userRepository = Substitute.For <IUserRepository>(); _applicationRepository = Substitute.For <IApplicationRepository>(); _userRepository.GetUserAsync(1).Returns(new User(1, "First")); _applicationRepository.GetByIdAsync(1).Returns(new Application(1, "MyApp")); _context = Substitute.For <IMessageContext>(); _configStore = new TestStore(); _sut = new InviteUserHandler(_invitationRepository, _userRepository, _applicationRepository, _configStore); }
public InviteUserHandlerTests() { _invitationRepository = Substitute.For <IInvitationRepository>(); _userRepository = Substitute.For <IUserRepository>(); _applicationRepository = Substitute.For <IApplicationRepository>(); _commandBus = Substitute.For <ICommandBus>(); _eventBus = Substitute.For <IEventBus>(); _userRepository.GetUserAsync(1).Returns(new User(1, "First")); _applicationRepository.GetByIdAsync(1).Returns(new Application(1, "MyApp")); ConfigurationStore.Instance = new TestStore(); _sut = new InviteUserHandler(_invitationRepository, _eventBus, _userRepository, _applicationRepository, _commandBus); }