public void ThrowArgumentNullException_WhenNullEditCarServiceIsPassed() { //arrange var validUserSessionStub = new Mock <IUserSession>(); IEditCarService nullEditCarService = null; //act&assert Assert.ThrowsException <ArgumentNullException>(() => new Dealership.Client.Commands.CarCommands.EditCommand(validUserSessionStub.Object, nullEditCarService)); }
public CarController(ICarService carService, IEditCarService editCarService, IBrandService brandService, IBodyTypeService bodyTypeService, IColorTypeService colorTypeService, IFuelTypeService fuelTypeService, IGearTypeService gearTypeService, IModelService modelService, IColorService colorService, IUserService userService, UserManager <User> userManager) { this.carService = carService; this.editCarService = editCarService; this.brandService = brandService; this.bodyTypeService = bodyTypeService; this.colorTypeService = colorTypeService; this.fuelTypeService = fuelTypeService; this.gearTypeService = gearTypeService; this.modelService = modelService; this.colorService = colorService; this.userService = userService; this.userManager = userManager; }