Skip to content

Commit 8a4f56a

Browse files
committed
NH-3725 - Remove SharpTestsEx
1 parent ffea30d commit 8a4f56a

File tree

250 files changed

+2445
-3297
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

250 files changed

+2445
-3297
lines changed

lib/net/SharpTestsEx.NUnit.dll

-94.5 KB
Binary file not shown.

lib/net/SharpTestsEx.NUnit.xml

Lines changed: 0 additions & 772 deletions
This file was deleted.

lib/net/SharpTestsEx_License.txt

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/NHibernate.Test.VisualBasic/NHibernate.Test.VisualBasic.build

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
<include name="NHibernate.DomainModel.dll" />
2626
<include name="NHibernate.dll" />
2727
<include name="nunit.framework.dll" />
28-
<include name="SharpTestsEx.NUnit.dll" />
2928
<include name="System.Linq.Dynamic.dll" />
3029
</assemblyfileset>
3130
<resourcefileset id="project.resources" prefix="NHibernate.Test.VisualBasic" dynamicprefix="false">

src/NHibernate.Test/Bytecode/Lightweight/BytecodeProviderFixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public void NotConfiguredProxyFactoryFactory()
1515
{
1616
var bcp = new BytecodeProviderImpl();
1717
IProxyFactoryFactory p = bcp.ProxyFactoryFactory;
18-
p.Should().Be.InstanceOf<DefaultProxyFactoryFactory>();
18+
Assert.That(p, Is.InstanceOf<DefaultProxyFactoryFactory>());
1919
}
2020

2121
[Test]

src/NHibernate.Test/CfgTest/AccessorsSerializableTest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@ public class AccessorsSerializableTest
1313
[Test, TestCaseSource("accessors")]
1414
public void AllAccessorsAreMarkedAsSerializable(System.Type concreteAccessor)
1515
{
16-
concreteAccessor.Should().Have.Attribute<SerializableAttribute>();
16+
Assert.That(concreteAccessor, Has.Attribute<SerializableAttribute>());
1717
}
1818

1919
private static System.Type[] setters = typeof(ISetter).Assembly.GetTypes().Where(t => t.Namespace == typeof(ISetter).Namespace && t.GetInterfaces().Contains(typeof(ISetter))).ToArray();
2020

2121
[Test, TestCaseSource("setters")]
2222
public void AllSettersAreMarkedAsSerializable(System.Type concreteAccessor)
2323
{
24-
concreteAccessor.Should().Have.Attribute<SerializableAttribute>();
24+
Assert.That(concreteAccessor, Has.Attribute<SerializableAttribute>());
2525
}
2626

2727
private static System.Type[] getters = typeof(IGetter).Assembly.GetTypes().Where(t => t.Namespace == typeof(IGetter).Namespace && t.GetInterfaces().Contains(typeof(IGetter))).ToArray();
2828

2929
[Test, TestCaseSource("getters")]
3030
public void AllGettersAreMarkedAsSerializable(System.Type concreteAccessor)
3131
{
32-
concreteAccessor.Should().Have.Attribute<SerializableAttribute>();
32+
Assert.That(concreteAccessor, Has.Attribute<SerializableAttribute>());
3333
}
3434
}
3535
}

src/NHibernate.Test/CfgTest/ConfigurationAddMappingEvents.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ public void WhenSubscribedToBeforeBindThenRaiseEventForEachMapping()
4545
var listOfCalls = new List<BindMappingEventArgs>();
4646
var configuration = new Configuration();
4747
configuration.DataBaseIntegration(x => x.Dialect<MsSql2008Dialect>());
48-
configuration.BeforeBindMapping += (sender, args) => { sender.Should().Be.SameInstanceAs(configuration); listOfCalls.Add(args); };
48+
configuration.BeforeBindMapping += (sender, args) => { Assert.That(sender, Is.SameAs(configuration)); listOfCalls.Add(args); };
4949

5050
configuration.AddXmlString(ProductLineMapping);
5151
configuration.AddXmlString(ModelMapping);
5252

53-
listOfCalls.Count.Should().Be(2);
54-
listOfCalls.Select(x => x.FileName).All(x => x.Satisfy(filename => filename != null));
55-
listOfCalls.Select(x => x.Mapping).All(x => x.Satisfy(mappingDoc => mappingDoc != null));
56-
listOfCalls.Select(x => x.Dialect).All(x => x.Satisfy(dialect => dialect.GetType() == typeof(MsSql2008Dialect)));
53+
Assert.That(listOfCalls.Count, Is.EqualTo(2));
54+
Assert.That(listOfCalls.Select(x => x.FileName).All(x => x != null), Is.True);
55+
Assert.That(listOfCalls.Select(x => x.Mapping).All(x => x != null), Is.True);
56+
Assert.That(listOfCalls.Select(x => x.Dialect).All(x => x.GetType() == typeof (MsSql2008Dialect)), Is.True);
5757
}
5858

5959
[Test]
@@ -62,15 +62,15 @@ public void WhenSubscribedToAfterBindThenRaiseEventForEachMapping()
6262
var listOfCalls = new List<BindMappingEventArgs>();
6363
var configuration = new Configuration();
6464
configuration.DataBaseIntegration(x => x.Dialect<MsSql2008Dialect>());
65-
configuration.AfterBindMapping += (sender, args) => { sender.Should().Be.SameInstanceAs(configuration); listOfCalls.Add(args); };
65+
configuration.AfterBindMapping += (sender, args) => { Assert.That(sender, Is.SameAs(configuration)); listOfCalls.Add(args); };
6666

6767
configuration.AddXmlString(ProductLineMapping);
6868
configuration.AddXmlString(ModelMapping);
6969

70-
listOfCalls.Count.Should().Be(2);
71-
listOfCalls.Select(x => x.FileName).All(x => x.Satisfy(filename => filename != null));
72-
listOfCalls.Select(x => x.Mapping).All(x => x.Satisfy(mappingDoc => mappingDoc != null));
73-
listOfCalls.Select(x => x.Dialect).All(x => x.Satisfy(dialect => dialect.GetType() == typeof(MsSql2008Dialect)));
70+
Assert.That(listOfCalls.Count, Is.EqualTo(2));
71+
Assert.That(listOfCalls.Select(x => x.FileName).All(x => x != null), Is.True);
72+
Assert.That(listOfCalls.Select(x => x.Mapping).All(x => x != null), Is.True);
73+
Assert.That(listOfCalls.Select(x => x.Dialect).All(x => x.GetType() == typeof(MsSql2008Dialect)), Is.True);
7474
}
7575
}
7676
}

src/NHibernate.Test/CfgTest/ConfigurationSchemaFixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public void InvalidConfig()
2929
public void FromAppConfigTest()
3030
{
3131
IHibernateConfiguration hc = ConfigurationManager.GetSection("hibernate-configuration") as IHibernateConfiguration;
32-
hc.ByteCodeProviderType.Should().Be("lcg");
32+
Assert.That(hc.ByteCodeProviderType, Is.EqualTo("lcg"));
3333
Assert.IsTrue(hc.UseReflectionOptimizer);
3434
Assert.AreEqual("NHibernate.Test", hc.SessionFactory.Name);
3535
}

src/NHibernate.Test/CfgTest/CustomBytecodeProviderTest.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,29 +34,29 @@ public override IReflectionOptimizer GetReflectionOptimizer(System.Type clazz, I
3434
public void WhenNoShortCutUsedThenCanBuildBytecodeProvider()
3535
{
3636
var properties = new Dictionary<string, string> { { Environment.PropertyBytecodeProvider, typeof(MyByteCodeProvider).AssemblyQualifiedName } };
37-
Executing.This(() => Environment.BuildBytecodeProvider(properties)).Should().NotThrow();
37+
Assert.That(() => Environment.BuildBytecodeProvider(properties), Throws.Nothing);
3838
}
3939

4040
[Test]
4141
public void WhenNoShortCutUsedThenCanBuildInstanceOfConfiguredBytecodeProvider()
4242
{
4343
var properties = new Dictionary<string, string> { { Environment.PropertyBytecodeProvider, typeof(MyByteCodeProvider).AssemblyQualifiedName } };
44-
Environment.BuildBytecodeProvider(properties).Should().Be.InstanceOf<MyByteCodeProvider>();
44+
Assert.That(Environment.BuildBytecodeProvider(properties), Is.InstanceOf<MyByteCodeProvider>());
4545
}
4646

4747
[Test]
4848
public void WhenInvalidThenThrow()
4949
{
5050
var properties = new Dictionary<string, string> { { Environment.PropertyBytecodeProvider, typeof(InvalidByteCodeProvider).AssemblyQualifiedName } };
51-
Executing.This(() => Environment.BuildBytecodeProvider(properties)).Should().Throw<HibernateByteCodeException>();
51+
Assert.That(() => Environment.BuildBytecodeProvider(properties), Throws.TypeOf<HibernateByteCodeException>());
5252
}
5353

5454
[Test]
5555
public void WhenNoDefaultCtorThenThrow()
5656
{
5757
var properties = new Dictionary<string, string> { { Environment.PropertyBytecodeProvider, typeof(InvalidNoCtorByteCodeProvider).AssemblyQualifiedName } };
58-
Executing.This(() => Environment.BuildBytecodeProvider(properties)).Should().Throw<HibernateByteCodeException>()
59-
.And.Exception.InnerException.Message.Should().Contain("constructor was not found");
58+
Assert.That(() => Environment.BuildBytecodeProvider(properties), Throws.TypeOf<HibernateByteCodeException>()
59+
.And.InnerException.Message.ContainsSubstring("constructor was not found"));
6060
}
6161
}
6262
}

src/NHibernate.Test/CfgTest/Loquacious/LambdaConfigurationFixture.cs

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -39,29 +39,29 @@ public void FullConfiguration()
3939
p.ProxyFactoryFactory<DefaultProxyFactoryFactory>();
4040
});
4141
configure.Mappings(m=>
42-
{
43-
m.DefaultCatalog = "MyCatalog";
44-
m.DefaultSchema = "MySche";
45-
});
42+
{
43+
m.DefaultCatalog = "MyCatalog";
44+
m.DefaultSchema = "MySche";
45+
});
4646
configure.DataBaseIntegration(db =>
47-
{
48-
db.Dialect<MsSql2000Dialect>();
49-
db.KeywordsAutoImport = Hbm2DDLKeyWords.AutoQuote;
50-
db.Batcher<SqlClientBatchingBatcherFactory>();
51-
db.BatchSize = 15;
52-
db.ConnectionProvider<DebugConnectionProvider>();
53-
db.Driver<SqlClientDriver>();
54-
db.ConnectionReleaseMode = ConnectionReleaseMode.AfterTransaction;
55-
db.IsolationLevel = IsolationLevel.ReadCommitted;
56-
db.ConnectionString = "The connection string";
57-
db.AutoCommentSql = true;
58-
db.ExceptionConverter<SQLStateConverter>();
59-
db.PrepareCommands = true;
60-
db.Timeout = 10;
61-
db.MaximumDepthOfOuterJoinFetching = 11;
62-
db.HqlToSqlSubstitutions = "true 1, false 0, yes 'Y', no 'N'";
63-
db.SchemaAction = SchemaAutoAction.Validate;
64-
});
47+
{
48+
db.Dialect<MsSql2000Dialect>();
49+
db.KeywordsAutoImport = Hbm2DDLKeyWords.AutoQuote;
50+
db.Batcher<SqlClientBatchingBatcherFactory>();
51+
db.BatchSize = 15;
52+
db.ConnectionProvider<DebugConnectionProvider>();
53+
db.Driver<SqlClientDriver>();
54+
db.ConnectionReleaseMode = ConnectionReleaseMode.AfterTransaction;
55+
db.IsolationLevel = IsolationLevel.ReadCommitted;
56+
db.ConnectionString = "The connection string";
57+
db.AutoCommentSql = true;
58+
db.ExceptionConverter<SQLStateConverter>();
59+
db.PrepareCommands = true;
60+
db.Timeout = 10;
61+
db.MaximumDepthOfOuterJoinFetching = 11;
62+
db.HqlToSqlSubstitutions = "true 1, false 0, yes 'Y', no 'N'";
63+
db.SchemaAction = SchemaAutoAction.Validate;
64+
});
6565

6666
Assert.That(configure.Properties[Environment.SessionFactoryName], Is.EqualTo("SomeName"));
6767
Assert.That(configure.Properties[Environment.CacheProvider],
@@ -102,7 +102,7 @@ public void FullConfiguration()
102102
Assert.That(configure.Properties[Environment.MaxFetchDepth], Is.EqualTo("11"));
103103
Assert.That(configure.Properties[Environment.QuerySubstitutions], Is.EqualTo("true 1, false 0, yes 'Y', no 'N'"));
104104
Assert.That(configure.Properties[Environment.Hbm2ddlAuto], Is.EqualTo("validate"));
105-
configure.Properties[Environment.LinqToHqlGeneratorsRegistry].Should().Be(typeof(DefaultLinqToHqlGeneratorsRegistry).AssemblyQualifiedName);
105+
Assert.That(configure.Properties[Environment.LinqToHqlGeneratorsRegistry], Is.EqualTo(typeof(DefaultLinqToHqlGeneratorsRegistry).AssemblyQualifiedName));
106106
}
107107
}
108108
}

0 commit comments

Comments
 (0)