adds tests

This commit is contained in:
Shannon
2015-01-23 16:40:17 +11:00
parent 070fc368b2
commit bd5833ec5f

View File

@@ -61,7 +61,7 @@ namespace Umbraco.Tests.Persistence
//assign the service context //assign the service context
new ServiceContext(repositoryFactory, new PetaPocoUnitOfWorkProvider(_logger), new FileUnitOfWorkProvider(), new PublishingStrategy(), cacheHelper, _logger), new ServiceContext(repositoryFactory, new PetaPocoUnitOfWorkProvider(_logger), new FileUnitOfWorkProvider(), new PublishingStrategy(), cacheHelper, _logger),
cacheHelper, cacheHelper,
new ProfilingLogger(new Logger(new FileInfo(TestHelper.MapPathForTest("~/unit-test-log4net.config"))), Mock.Of<IProfiler>())) new ProfilingLogger(_logger, Mock.Of<IProfiler>()))
{ {
IsReady = true IsReady = true
}; };
@@ -94,6 +94,31 @@ namespace Umbraco.Tests.Persistence
} }
} }
[Test]
public void Can_Create_umbracoAccess_Table()
{
using (Transaction transaction = Database.GetTransaction())
{
DatabaseSchemaHelper.CreateTable<NodeDto>();
DatabaseSchemaHelper.CreateTable<AccessDto>();
//transaction.Complete();
}
}
[Test]
public void Can_Create_umbracoAccessRule_Table()
{
using (Transaction transaction = Database.GetTransaction())
{
DatabaseSchemaHelper.CreateTable<NodeDto>();
DatabaseSchemaHelper.CreateTable<AccessDto>();
DatabaseSchemaHelper.CreateTable<AccessRuleDto>();
//transaction.Complete();
}
}
[Test] [Test]
public void Can_Create_umbracoApp_Table() public void Can_Create_umbracoApp_Table()
{ {