public void ValidateDefault() { BuyerBrandViewModel viewModel = new BuyerBrandViewModel(); var result = viewModel.Validate(null); Assert.True(result.Count() > 0); }
public void Validate_Throws_ServiceValidationExeption() { Mock <IServiceProvider> serviceProvider = new Mock <IServiceProvider>(); BuyerBrandViewModel viewModel = new BuyerBrandViewModel(); ValidateService service = new ValidateService(serviceProvider.Object); Assert.Throws <ServiceValidationException>(() => service.Validate(viewModel)); }
public void should_Success_Instantiate() { BuyerBrandViewModel viewModel = new BuyerBrandViewModel() { Name = "Name", Code = "Code", }; Assert.Equal("Name", viewModel.Name); }