You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dice_app/Sources/Data/EF/DiceAppDbContextWithStub.cs

30 lines
1.1 KiB

using Data.EF.Players;
using Microsoft.EntityFrameworkCore;
using Model.Games;
using System.Security.Cryptography.X509Certificates;
namespace Data.EF
{
public class DiceAppDbContextWithStub : DiceAppDbContext
{
public override MasterOfCeremonies LoadApp() { throw new NotImplementedException(); }
public DiceAppDbContextWithStub() { }
public DiceAppDbContextWithStub(DbContextOptions<DiceAppDbContext> options)
: base(options) { }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.Entity<PlayerEntity>().HasData(
new PlayerEntity { ID = Guid.NewGuid(), Name = "Alice" }, // some tests depend on this name
new PlayerEntity { ID = Guid.NewGuid(), Name = "Bob" }, // some tests depend on this name
new PlayerEntity { ID = Guid.NewGuid(), Name = "Clyde" }, // some tests depend on this name
new PlayerEntity { ID = Guid.NewGuid(), Name = "Dahlia" } // some tests depend on this name
);
}
}
}