embedded type convector is now registered for all embedded types automatically.

This commit is contained in:
kay.one 2013-03-31 17:20:01 -07:00
parent bdcdc7c0f6
commit c1fba9093d
5 changed files with 42 additions and 24 deletions

View file

@ -1,8 +1,10 @@
using System;
using System.Collections.Generic;
using FluentAssertions;
using Marr.Data;
using NUnit.Framework;
using NzbDrone.Core.Datastore;
using NzbDrone.Core.Datastore.Converters;
using NzbDrone.Core.Tv;
namespace NzbDrone.Core.Test.Datastore
@ -35,6 +37,15 @@ namespace NzbDrone.Core.Test.Datastore
public int WriteOnly { private get; set; }
}
[SetUp]
public void Setup()
{
MapRepository.Instance.RegisterTypeConverter(typeof(List<EmbeddedType>), new EmbeddedDocumentConverter());
MapRepository.Instance.RegisterTypeConverter(typeof(EmbeddedType), new EmbeddedDocumentConverter());
MapRepository.Instance.RegisterTypeConverter(typeof(Int32), new Int32Converter());
}
[Test]
public void test_mappable_types()