public void GetCategorys_ShouldReturnAllCategorys() { ISampleContext context = _sampleContextMock.Object; CategoryService objectUnderTest = new CategoryService(context); var result = objectUnderTest.GetCategorys(); result.Should().NotBeNull(); result.Should().OnlyContain(e => _categoryList.Any(f => e.Id == f.Id)); result.Should().OnlyContain(e => _categoryList.Any(f => e.Name == f.Name)); result.Should().HaveCount(_categoryList.Count); }
public void GetCategory_OnVariousStrings_ShouldReturnTheGoodResults() { ISampleContext context = _sampleContextMock.Object; CategoryService objectUnderTest = new CategoryService(context); var result = objectUnderTest.GetCategory("Name0"); var result2 = objectUnderTest.GetCategory("WrongName"); result.Should().NotBeNull(); result.Id.Should().Be(0); result.Name.Should().Be("Name0"); result2.Should().BeNull(); }
public SportsRepository(ISampleContext context) : base(context, context.Sports) { }
public CategoryService(ISampleContext context) : base(context) { }
public TransactionService(ISampleContext context, ICategoryService categoryService, IUserService userService) : base(context) { _categoryService = categoryService; _userService = userService; }
public TransmissionRepository(ISampleContext context) : base(context, context.Transmissions) { }
public AppointmentService(ISampleContext sampleContext) { _sampleContext = sampleContext; }
public EventRepository(ISampleContext context) : base(context, context.Event) { }
public BaseService(ISampleContext context) { Context = context; }
public StudentService(ISampleContext sampleContext) { _sampleContext = sampleContext; }
public TaskRepository(ISampleContext context) : base(context, context.Tasks) { }
public AddressRepository(ISampleContext context) : base(context, context.Address) { }
public UserService(ISampleContext context) : base(context) { }
public AnimalRepository(ISampleContext context) { _context = context; }