Commits

Roger Kratz  committed 9a54886

cleaning up

  • Participants
  • Parent commits 1086280

Comments (0)

Files changed (1)

File NHibernate.Envers.SetForNet4Test/Tests/SimpleTest.cs

 		[SetUp]
 		public void Setup()
 		{
-			var cfg = new Cfg.Configuration();
-			//for nh core
-			cfg.Properties[Environment.CollectionTypeFactoryClass] = typeof(Net4CollectionTypeFactory).AssemblyQualifiedName;
-			//for nh envers
-			cfg.Properties[ConfigurationKey.CollectionProxyMapperFactory] = typeof(CollectionProxyMapperFactoryForNet4).AssemblyQualifiedName;
-			cfg.Configure();
-			cfg.AddAssembly(GetType().Assembly);
+			var cfg = new Cfg.Configuration()
+					.SetProperty(Environment.CollectionTypeFactoryClass, typeof(Net4CollectionTypeFactory).AssemblyQualifiedName)
+					.SetProperty(ConfigurationKey.CollectionProxyMapperFactory, typeof(CollectionProxyMapperFactoryForNet4).AssemblyQualifiedName)
+					.Configure()
+					.AddAssembly(GetType().Assembly);
 			var enversCfg = new FluentConfiguration();
 			enversCfg.Audit<ParentEntity>();
 			cfg.IntegrateWithEnvers(enversCfg);
 		{
 			using (var session = sessionFactory.OpenSession())
 			{
-				CollectionAssert.AreEquivalent(new[] { 1 }, session.Auditer().GetRevisions(typeof(ParentEntity), parentId));
-				CollectionAssert.AreEquivalent(new[] { 1, 2 }, session.Auditer().GetRevisions(typeof(ParentEntity), childId1));
-				CollectionAssert.AreEquivalent(new[] { 1 }, session.Auditer().GetRevisions(typeof(ParentEntity), childId2));
+				session.Auditer().GetRevisions(typeof (ParentEntity), parentId).Should().Have.SameSequenceAs(1);
+				session.Auditer().GetRevisions(typeof(ParentEntity), childId1).Should().Have.SameSequenceAs(1, 2);
+				session.Auditer().GetRevisions(typeof(ParentEntity), childId2).Should().Have.SameSequenceAs(1);
 			}
 		}