public void Initialize() { _callback = Substitute.For <ICallback>(); _cabRideRepository = Substitute.For <ICabRideRepository>(); _cabRideMapper = Substitute.For <ICabRideMapper>(); _sut = new DroveCustomerToTrainStationHandler(_callback, _cabRideRepository, _cabRideMapper); }
public void Initialize() { _callback = Substitute.For <ICallback>(); // Bootstrap var serviceProvider = new ServiceCollection() .UseDispatchingBroker() .AddTransient((s) => _callback) .AddTransient((s) => Substitute.For <IBus>()) .AddTransient((s) => Substitute.For <ICabRideRepository>()) .BuildServiceProvider(); _sut = serviceProvider.GetService <DroveCustomerToTrainStationHandler>(); }