Adding test class for MediaRepository pending implementation

This commit is contained in:
sitereactor
2012-11-07 14:51:12 -01:00
parent a130642b02
commit 8e4b9ed743
3 changed files with 36 additions and 5 deletions

View File

@@ -0,0 +1,28 @@
using NUnit.Framework;
using Umbraco.Tests.TestHelpers;
namespace Umbraco.Tests.Persistence.Repositories
{
[TestFixture]
public class MediaRepositoryTest : BaseDatabaseFactoryTest
{
[SetUp]
public override void Initialize()
{
base.Initialize();
CreateTestData();
}
[TearDown]
public override void TearDown()
{
base.TearDown();
}
public void CreateTestData()
{
}
}
}

View File

@@ -27,11 +27,7 @@ namespace Umbraco.Tests.Services
CreateTestData();
}
[TearDown]
public override void TearDown()
{
base.TearDown();
}
//TODO Add test to verify there is only ONE newest document/content in cmsDocument table after updating.
[Test]
public void Can_Create_Content()
@@ -587,6 +583,12 @@ namespace Umbraco.Tests.Services
Assert.AreEqual(subpage2.Name, rollback.Name);
}
[TearDown]
public override void TearDown()
{
base.TearDown();
}
public void CreateTestData()
{
//NOTE Maybe not the best way to create/save test data as we are using the services, which are being tested.

View File

@@ -118,6 +118,7 @@
<Compile Include="Persistence\Repositories\ContentRepositoryTest.cs" />
<Compile Include="Persistence\Repositories\ContentTypeRepositoryTest.cs" />
<Compile Include="Persistence\Repositories\MacroRepositoryTest.cs" />
<Compile Include="Persistence\Repositories\MediaRepositoryTest.cs" />
<Compile Include="Persistence\Repositories\MediaTypeRepositoryTest.cs" />
<Compile Include="Persistence\RepositoryResolverTests.cs" />
<Compile Include="Persistence\SqlCeTableByTableTest.cs" />