Пример #1
0
        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);
        }
Пример #2
0
        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();
        }
Пример #3
0
 public SportsRepository(ISampleContext context) 
     : base(context, context.Sports)
 {
 }
Пример #4
0
 public CategoryService(ISampleContext context) : base(context)
 {
 }
Пример #5
0
 public TransactionService(ISampleContext context, ICategoryService categoryService, IUserService userService) : base(context)
 {
     _categoryService = categoryService;
     _userService     = userService;
 }
 public TransmissionRepository(ISampleContext context)
     : base(context, context.Transmissions)
 {
 }
Пример #7
0
 public AppointmentService(ISampleContext sampleContext)
 {
     _sampleContext = sampleContext;
 }
Пример #8
0
 public EventRepository(ISampleContext context)
     : base(context, context.Event)
 {
 }
Пример #9
0
 public BaseService(ISampleContext context)
 {
     Context = context;
 }
Пример #10
0
 public StudentService(ISampleContext sampleContext)
 {
     _sampleContext = sampleContext;
 }
Пример #11
0
 public TaskRepository(ISampleContext context) : base(context, context.Tasks)
 {
 }
Пример #12
0
 public AddressRepository(ISampleContext context)
     : base(context, context.Address)
 {
 }
Пример #13
0
 public UserService(ISampleContext context) : base(context)
 {
 }
Пример #14
0
 public AnimalRepository(ISampleContext context)
 {
     _context = context;
 }