public void Validate_Throws_ServiceValidationExeption() { Mock <IServiceProvider> serviceProvider = new Mock <IServiceProvider>(); MachineSpinningProcessTypeViewModel viewModel = new MachineSpinningProcessTypeViewModel(); var service = new Lib.Helpers.ValidateService.ValidateService(serviceProvider.Object); Assert.Throws <ServiceValidationException>(() => service.Validate(viewModel)); }
public void Should_Succes_Instantiate_validateService() { var serviceProviderMock = new Mock <IServiceProvider>(); var service = new Lib.Helpers.ValidateService.ValidateService(serviceProviderMock.Object); AccountBankViewModel viewModel = new AccountBankViewModel(); service.Validate(viewModel); Assert.NotNull(service); }