public void WhenGettingFillupsAndRepositoryThrows_ThenWrapsException()
        {
            _fillupRepositoryMock
            .Setup(f => f.GetFillups(DefaultVehicleId))
            .Throws <InvalidOperationException>();

            var handler = new GetFillupsForVehicle(_fillupRepositoryMock.Object);

            var ex = Assert.Throws <BusinessServicesException>(() => handler.Execute(DefaultVehicleId));

            Assert.IsType <InvalidOperationException>(ex.InnerException);
        }
Ejemplo n.º 2
0
 public GetFillUpsController(GetFillupsForVehicle getFillupsForVehicle)
 {
     this.getFillupsForVehicle = getFillupsForVehicle;
 }