Skip to content

Commit

Permalink
NH-3905 - More tests generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericDelaporte committed Sep 5, 2017
1 parent 4d99b2b commit ab9d883
Show file tree
Hide file tree
Showing 268 changed files with 465 additions and 192 deletions.
2 changes: 1 addition & 1 deletion Tools/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<package id="NUnit.Extension.NUnitV2ResultWriter" version="3.6.0" targetFramework="net461" />
<package id="NUnit.Extension.TeamCityEventListener" version="1.0.2" targetFramework="net461" />
<package id="NUnit.Extension.VSProjectLoader" version="3.6.0" targetFramework="net461" />
<package id="CSharpAsyncGenerator.CommandLine" version="0.3.6" targetFramework="net461" />
<package id="CSharpAsyncGenerator.CommandLine" version="0.4.0" targetFramework="net461" />
</packages>
5 changes: 5 additions & 0 deletions src/AsyncGenerator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@
hasAttributeName: IgnoreAttribute
- conversion: NewType
hasAttributeName: TestFixtureAttribute
- conversion: NewType
anyBaseTypeRule: HasTestFixtureAttribute
- conversion: Ignore
rule: IsTestCase
- conversion: Ignore
Expand Down Expand Up @@ -246,3 +248,6 @@ typeRules:
- filters:
- name: TestCase
name: IsTestCase
- filters:
- hasAttributeName: TestFixtureAttribute
name: HasTestFixtureAttribute
1 change: 1 addition & 0 deletions src/NHibernate.Test/CfgTest/AccessorsSerializableTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

namespace NHibernate.Test.CfgTest
{
[TestFixture]
public class AccessorsSerializableTest
{
private static System.Type[] accessors = typeof (IPropertyAccessor).Assembly.GetTypes().Where(t => t.Namespace == typeof (IPropertyAccessor).Namespace && t.GetInterfaces().Contains(typeof (IPropertyAccessor))).ToArray();
Expand Down
3 changes: 2 additions & 1 deletion src/NHibernate.Test/CfgTest/ConfigurationAddMappingEvents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

namespace NHibernate.Test.CfgTest
{
[TestFixture]
public class ConfigurationAddMappingEvents
{
private const string ProductLineMapping =
Expand Down Expand Up @@ -72,4 +73,4 @@ public void WhenSubscribedToAfterBindThenRaiseEventForEachMapping()
Assert.That(listOfCalls.Select(x => x.Dialect).All(x => x.GetType() == typeof(MsSql2008Dialect)), Is.True);
}
}
}
}
1 change: 1 addition & 0 deletions src/NHibernate.Test/CfgTest/CustomBytecodeProviderTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

namespace NHibernate.Test.CfgTest
{
[TestFixture]
public class CustomBytecodeProviderTest
{
private class MyByteCodeProvider : AbstractBytecodeProvider
Expand Down
3 changes: 2 additions & 1 deletion src/NHibernate.Test/CfgTest/Loquacious/NamedQueryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace NHibernate.Test.CfgTest.Loquacious
{
[TestFixture]
public class NamedQueryTests
{
[Test]
Expand Down Expand Up @@ -72,4 +73,4 @@ public void WhenSetValidTimeoutThenSetValue()
Assert.That(configure.NamedQueries.Values.Single().Timeout, Is.EqualTo(123));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

namespace NHibernate.Test.Component.Basic
{
[TestFixture]
public class ComponentWithUniqueConstraintTests : TestCaseMappingByCode
{
protected override HbmMapping GetMappings()
Expand Down
1 change: 1 addition & 0 deletions src/NHibernate.Test/DialectTest/MsSqlCe40DialectFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace NHibernate.Test.DialectTest
{
[TestFixture]
public class MsSqlCe40DialectFixture
{
[Test]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

namespace NHibernate.Test.DriverTest
{
[TestFixture]
public class DbProviderFactoryDriveConnectionCommandProviderTest
{
[Test]
Expand Down Expand Up @@ -35,4 +36,4 @@ public void WhenCreatedWithDbFactoryThenCanReturnCommand()
}
}
}
}
}
3 changes: 2 additions & 1 deletion src/NHibernate.Test/DriverTest/ReflectionBasedDriverTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace NHibernate.Test.DriverTest
{
[TestFixture]
public class ReflectionBasedDriverTest
{
private class MyDriverWithWrongClassesAndGoodDbProviderFactory : ReflectionBasedDriver
Expand Down Expand Up @@ -114,4 +115,4 @@ public void WhenCreatedNoWithDbFactoryThenCanReturnCommand()
}
}
}
}
}
3 changes: 2 additions & 1 deletion src/NHibernate.Test/DriverTest/Sql2008DateTime2Test.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public class EntityForMs2008
public virtual TimeSpan TimeSpanProp { get; set; }
}

[TestFixture]
public class Sql2008DateTime2Test : TestCase
{
protected override void Configure(Configuration configuration)
Expand Down Expand Up @@ -70,4 +71,4 @@ public void Crud()
}

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace NHibernate.Test.DynamicProxyTests
{
[TestFixture]
public class InterfaceWithEqualsGethashcodeTests
{
public interface IMyBaseObject
Expand Down Expand Up @@ -40,4 +41,4 @@ public void WhenProxyAnInterfaceShouldInterceptEquals()
Assert.That(interceptor.InterceptedMethods, Contains.Item("Equals"));
}
}
}
}
1 change: 1 addition & 0 deletions src/NHibernate.Test/DynamicProxyTests/PeVerifyFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

namespace NHibernate.Test.DynamicProxyTests
{
[TestFixture]
public class PeVerifyFixture
{
private static bool wasCalled;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public virtual void Method2(ref int x)
}
}

[TestFixture]
public class Fixture
{
[Test]
Expand All @@ -33,4 +34,4 @@ public void Proxy()
Assert.AreEqual(5, x);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace NHibernate.Test.DynamicProxyTests.ProxiedMembers
{
[TestFixture]
public class MetodWithRefDictionaryTest
{
public class MyClass
Expand All @@ -25,4 +26,4 @@ public void Proxy()
Assert.That(myParam, Is.Not.SameAs(dictionary));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

namespace NHibernate.Test.Events.Collections
{
[TestFixture]
public abstract class AbstractCollectionEventFixture : TestCase
{
protected override string MappingsAssembly
Expand Down Expand Up @@ -905,4 +906,4 @@ protected void CheckResult(CollectionListeners listeners, CollectionListeners.IL
CheckResult(listeners, listenerExpected, child, child.Parents, index);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

namespace NHibernate.Test.Events.Collections.Association
{
[TestFixture]
public abstract class AbstractAssociationCollectionEventFixture : AbstractCollectionEventFixture
{
[Test]
Expand Down Expand Up @@ -36,4 +37,4 @@ public void DeleteParentButNotChild()
CheckNumberOfResults(listeners, index);
}
}
}
}
3 changes: 2 additions & 1 deletion src/NHibernate.Test/Events/DisposableListenersTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public void Dispose()
}
}

[TestFixture]
public partial class DisposableListenersTest
{
[Test]
Expand All @@ -31,4 +32,4 @@ public void WhenCloseSessionFactoryThenCallDisposeOfListener()
Assert.That(myDisposableListener.DisposeCalled, Is.True);
}
}
}
}
3 changes: 2 additions & 1 deletion src/NHibernate.Test/Futures/LinqToFutureValueFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace NHibernate.Test.Futures
{
[TestFixture]
public class LinqToFutureValueFixture : FutureFixture
{
[Test]
Expand Down Expand Up @@ -56,4 +57,4 @@ protected override void OnTearDown()
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace NHibernate.Test.GeneratedTest
{
[TestFixture]
public abstract class AbstractGeneratedPropertyTest : TestCase
{
protected override string MappingsAssembly
Expand Down
1 change: 1 addition & 0 deletions src/NHibernate.Test/Hql/Ast/QuerySubstitutionTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

namespace NHibernate.Test.Hql.Ast
{
[TestFixture]
public class QuerySubstitutionTest: BaseFixture
{
protected override void Configure(NHibernate.Cfg.Configuration configuration)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace NHibernate.Test.Immutable.EntityWithMutableCollection
/// <summary>
/// Hibernate tests ported from trunk revision 19910 (July 8, 2010)
/// </summary>
[TestFixture]
public abstract class AbstractEntityWithManyToManyTest : TestCase
{
private bool isPlanContractsInverse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace NHibernate.Test.Immutable.EntityWithMutableCollection
/// <summary>
/// Hibernate tests ported from trunk revision 19910 (July 8, 2010)
/// </summary>
[TestFixture]
public abstract class AbstractEntityWithOneToManyTest : TestCase
{
private bool isContractPartiesInverse;
Expand Down
3 changes: 2 additions & 1 deletion src/NHibernate.Test/Insertordering/InsertOrderingFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

namespace NHibernate.Test.Insertordering
{
[TestFixture]
public class InsertOrderingFixture : TestCase
{
const int batchSize = 10;
Expand Down Expand Up @@ -613,4 +614,4 @@ public IBatcher CreateBatcher(ConnectionManager connectionManager, IInterceptor

#endregion
}
}
}
3 changes: 2 additions & 1 deletion src/NHibernate.Test/Linq/ByMethod/CastTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

namespace NHibernate.Test.Linq.ByMethod
{
[TestFixture]
public class CastTests : LinqTestCase
{
[Test]
Expand Down Expand Up @@ -49,4 +50,4 @@ public void CastDowncastUsingOfType()
Assert.That(() => query.ToList(), Throws.Exception);
}
}
}
}
3 changes: 2 additions & 1 deletion src/NHibernate.Test/Linq/CharComparisonTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

namespace NHibernate.Test.Linq
{
[TestFixture]
public class CharEqualityTests : TestCaseMappingByCode
{
protected override HbmMapping GetMappings()
Expand Down Expand Up @@ -193,4 +194,4 @@ public class Person
public virtual string Name { get; set; }
public virtual char Type { get; set; }
}
}
}
3 changes: 2 additions & 1 deletion src/NHibernate.Test/Linq/CustomExtensionsExample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public override HqlTreeNode BuildHql(MethodInfo method, Expression targetObject,
}
}

[TestFixture]
public class CustomExtensionsExample : LinqTestCase
{
protected override void Configure(NHibernate.Cfg.Configuration configuration)
Expand All @@ -63,4 +64,4 @@ public void CanUseMyCustomExtension()
Assert.That(contacts.All(c => c.ContactName.Contains("Thomas")), Is.True);
}
}
}
}
1 change: 1 addition & 0 deletions src/NHibernate.Test/Linq/CustomQueryModelRewriterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace NHibernate.Test.Linq
{
[TestFixture]
public class CustomQueryModelRewriterTests : LinqTestCase
{
protected override void Configure(Cfg.Configuration configuration)
Expand Down
1 change: 1 addition & 0 deletions src/NHibernate.Test/Linq/ExpressionSessionLeakTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

namespace NHibernate.Test.Linq
{
[TestFixture]
public class ExpressionSessionLeakTest : LinqTestCase
{
[Test]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

namespace NHibernate.Test.Linq
{
[TestFixture]
public class LinqToHqlGeneratorsRegistryFactoryTest
{
[Test]
Expand Down Expand Up @@ -54,4 +55,4 @@ public void RegisterGenerator(IRuntimeMethodHqlGenerator generator)
}
}
}
}
}
1 change: 1 addition & 0 deletions src/NHibernate.Test/Linq/QueryTimeoutTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

namespace NHibernate.Test.Linq
{
[TestFixture]
public class QueryTimeoutTests : LinqTestCase
{
protected override bool AppliesTo(Dialect.Dialect dialect)
Expand Down
3 changes: 2 additions & 1 deletion src/NHibernate.Test/Linq/StatelessSessionQueringTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

namespace NHibernate.Test.Linq
{
[TestFixture]
public class StatelessSessionQueringTest : LinqTestCase
{
[Test]
Expand All @@ -29,4 +30,4 @@ public void AggregateWithStartsWith()
}
}
}
}
}
Loading

0 comments on commit ab9d883

Please sign in to comment.