Example #1
0
 public InvalidPostAgifyBadRequestTests() : base(serviceConfiguration: services =>
 {
     services.ReplaceWithFake <INicknameService>(new FakeNicknameServiceWithBadRequest());
 })
 {
     _context = GetDbContext <NicknamesContext>();
     _context.AddDefaultUser();
 }
 public ValidPostTests() : base(services =>
 {
     services.ReplaceWithFake <INicknameService>(new FakeNicknameServiceWithValidRequest());
 })
 {
     _context = GetDbContext <NicknamesContext>();
     _context.AddDefaultUser();
 }
 public UserExists(NicknamesContext context)
 {
     _context = context;
 }
Example #4
0
 public static void AddNickname(this NicknamesContext context, Nickname nickname)
 {
     context.Nicknames.Add(nickname);
     context.SaveChanges();
 }
Example #5
0
 public static void AddDefaultUser(this NicknamesContext context)
 {
     context.Users.Add(DataAccessTestData.DefaultUser);
     context.SaveChanges();
 }
Example #6
0
 public static void AddNicknames(this NicknamesContext context, IEnumerable <Nickname> nicknames)
 {
     context.Nicknames.AddRange(nicknames);
     context.SaveChanges();
 }
 public ValidGetTests()
 {
     _context = GetDbContext <NicknamesContext>();
     _context.AddDefaultUser();
 }
 public AddNicknames(NicknamesContext context)
 {
     _context = context;
 }
Example #9
0
 public InvalidGetTests()
 {
     _context = GetDbContext <NicknamesContext>();
 }
 public GetTheYoungestNickname(NicknamesContext context)
 {
     _context = context;
 }