Example #1
0
        public SeedFixture()
        {
            this.context = new GetPdfOnlineDbContext("Data Source=UnitTests.db");

            context.Database.Migrate();
            context.Seed();
            context.SaveChanges();

            this.repository = new ConvertLogRepository(context);
        }
Example #2
0
        public void DatabaseCreateTest()
        {
            File.Delete("test.db");

            GetPdfOnlineDbContext context = new GetPdfOnlineDbContext("test.db");

            //context.Database.EnsureCreated();
            context.Database.Migrate();
            context.Seed();
            context.SaveChanges();

            Assert.NotNull(context);

            ConvertLogRepository repository = new ConvertLogRepository(context);

            var log = repository.GetConvertLog(new Guid("CFF29BD8-C0AB-4AC0-B932-06680205E7D2"));

            Assert.Equal("Document", log.FileCategoryCode);
        }