public async Task Selects_AllLimits() { // Arrange const int expected = 2; using (var context = new DueltankDbContext(_dbContextOptions)) { context.Limit.Add(new Limit { Name = "Forbidden", Created = DateTime.UtcNow, Updated = DateTime.UtcNow }); context.Limit.Add(new Limit { Name = "Limited", Created = DateTime.UtcNow, Updated = DateTime.UtcNow }); context.SaveChanges(); } // Act var result = await _sut.AllLimits(); // Assert result.Count.Should().Be(expected); }
public async Task Selects_All_Attributes() { // Arrange var expected = 2; using (var context = new DueltankDbContext(_dbContextOptions)) { context.Format.Add(new Format { Name = "TCG", Created = DateTime.UtcNow, Updated = DateTime.UtcNow }); context.Format.Add(new Format { Name = "OCG", Created = DateTime.UtcNow, Updated = DateTime.UtcNow }); context.SaveChanges(); } // Act var result = await _sut.AllFormats(); // Assert result.Count.Should().Be(expected); }
public async Task Selects_All_Categories() { // Arrange var expected = 2; using (var context = new DueltankDbContext(_dbContextOptions)) { context.Category.Add(new Category { Name = "Monster", Created = DateTime.UtcNow, Updated = DateTime.UtcNow }); context.Category.Add(new Category { Name = "Spell", Created = DateTime.UtcNow, Updated = DateTime.UtcNow }); context.SaveChanges(); } // Act var result = await _sut.AllCategories(); // Assert result.Count.Should().Be(expected); }
public async Task Selects_All_Cards() { // Arrange const int expected = 77585513; using (var context = new DueltankDbContext(_dbContextOptions)) { context.Card.Add(new Card { Name = "Jinzo", CardNumber = 77585513, Description = "Trap Cards, and their effects on the field, cannot be activated. Negate all Trap effects on the field.", Created = DateTime.UtcNow, Updated = DateTime.UtcNow }); context.SaveChanges(); } // Act var result = await _sut.GetCardByNumber(77585513); // Assert result.CardNumber.Should().Be(expected); }
public async Task Selects_All_Types() { // Arrange var expected = 2; using (var context = new DueltankDbContext(_dbContextOptions)) { context.Type.Add(new Type { Name = "Earth", Created = DateTime.UtcNow, Updated = DateTime.UtcNow }); context.Type.Add(new Type { Name = "Water", Created = DateTime.UtcNow, Updated = DateTime.UtcNow }); context.SaveChanges(); } // Act var result = await _sut.AllTypes(); // Assert result.Count.Should().Be(expected); }
public DeckTypeRepository(DueltankDbContext dbContext) { _dbContext = dbContext; }
public FormatRepository(DueltankDbContext context) { _context = context; }
public TipRepository(DueltankDbContext dbContext) { _dbContext = dbContext; }
public CategoryRepository(DueltankDbContext dbContext) { _dbContext = dbContext; }
public RulingRepository(DueltankDbContext dbContext) { _dbContext = dbContext; }
public AttributeRepository(DueltankDbContext dbContext) { _dbContext = dbContext; }
public ArchetypeRepository(DueltankDbContext dbContext) { _dbContext = dbContext; }
public UserRepository(DueltankDbContext dbContext) { _dbContext = dbContext; }
public DeckCardRepository(DueltankDbContext dbContext) { _dbContext = dbContext; }
public BanlistRepository(DueltankDbContext dbContext) { _dbContext = dbContext; }
public LimitRepository(DueltankDbContext dbContext) { _dbContext = dbContext; }