Skip to content

Jira to GitHub: change issue naming in tests #1382

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,21 @@ In most cases, you will be adding your test to the NHibernate.Test project. If t

1. Open **NHibernate.sln** from the src folder.
2. If adding a C# test, go to the NHSpecificTest folder in the NHibernate.Test project. If adding a VisualBasic test, go to the Issues folder in the NHibernate.Test.VisualBasic project.
3. Copy and paste the NH0000 folder to create a duplicate test ("Copy of NH0000").
4. Replace the four (five for vb) instances of NH0000 with your issue number.
3. Copy and paste the GH0000 folder to create a duplicate test ("Copy of GH0000").
4. Replace the four instances of GH0000 with your issue number.
5. Edit the test as you see fit. Don't commit yet; there are details in a later step.

Do not use anymore the NHxxxx naming, they match issue numbers from https://nhibernate.jira.com/

NHibernate has migrated its issue tracking from Jira to GitHub, and using the Jira naming may lead to conflicts with previous Jira issues.

## Running Your Unit Test

### Debugging Through Included NUnit GUI

1. Right click on the project (ex. NHibernate.Test) in Visual Studio.
2. Select: Debug -> Start New Instance
3. Type the name of your unit test to quickly go to it. For example: NH2318
3. Type the name of your unit test to quickly go to it. For example: GH2318
4. Select and run the test.
5. You can also make the test project your startup project and it will run NUnit when you press F5.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Namespace Issues

Namespace NH0000
Namespace GH0000

Public Class Entity

Expand Down Expand Up @@ -28,4 +28,4 @@

End Namespace

End Namespace
End Namespace
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Imports NHibernate.Linq

Namespace Issues

Namespace NH0000
Namespace GH0000

<TestFixture()> _
Public Class Fixture
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="NHibernate.Test.VisualBasic" namespace="NHibernate.Test.VisualBasic.Issues.NH0000">
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="NHibernate.Test.VisualBasic" namespace="NHibernate.Test.VisualBasic.Issues.GH0000">

<class name="Entity">
<id name="Id">
Expand All @@ -8,4 +8,4 @@
<property name="Name" />
</class>

</hibernate-mapping>
</hibernate-mapping>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
using NHibernate.Linq;
using NUnit.Framework;

namespace NHibernate.Test.NHSpecificTest.NH0000
namespace NHibernate.Test.NHSpecificTest.GH0000
{
using System.Threading.Tasks;
[TestFixture]
Expand Down Expand Up @@ -60,4 +60,4 @@ public async Task YourTestNameAsync()
}
}
}
}
}
1 change: 0 additions & 1 deletion src/NHibernate.Test/Async/NHSpecificTest/NH2218/Fixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

using System.Linq;
using NHibernate.Linq;
using NHibernate.Test.NHSpecificTest.NH0000;
using NUnit.Framework;

namespace NHibernate.Test.NHSpecificTest.NH2218
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System;

namespace NHibernate.Test.NHSpecificTest.NH0000
namespace NHibernate.Test.NHSpecificTest.GH0000
{
class Entity
{
public virtual Guid Id { get; set; }
public virtual string Name { get; set; }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using NHibernate.Linq;
using NUnit.Framework;

namespace NHibernate.Test.NHSpecificTest.NH0000
namespace NHibernate.Test.NHSpecificTest.GH0000
{
[TestFixture]
public class Fixture : BugTestCase
Expand Down Expand Up @@ -49,4 +49,4 @@ public void YourTestName()
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using NHibernate.Mapping.ByCode;
using NUnit.Framework;

namespace NHibernate.Test.NHSpecificTest.NH0000
namespace NHibernate.Test.NHSpecificTest.GH0000
{
/// <summary>
/// Fixture using 'by code' mappings
Expand Down Expand Up @@ -70,4 +70,4 @@ public void YourTestName()
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="NHibernate.Test" namespace="NHibernate.Test.NHSpecificTest.NH0000">
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="NHibernate.Test" namespace="NHibernate.Test.NHSpecificTest.GH0000">

<class name="Entity">
<id name="Id" generator="guid.comb" />
<property name="Name" />
</class>

</hibernate-mapping>
</hibernate-mapping>
10 changes: 10 additions & 0 deletions src/NHibernate.Test/NHSpecificTest/NH2218/Entity.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using System;

namespace NHibernate.Test.NHSpecificTest.NH2218
{
class Entity
{
public virtual Guid Id { get; set; }
public virtual string Name { get; set; }
}
}
1 change: 0 additions & 1 deletion src/NHibernate.Test/NHSpecificTest/NH2218/Fixture.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Linq;
using NHibernate.Linq;
using NHibernate.Test.NHSpecificTest.NH0000;
Copy link
Member Author

@fredericDelaporte fredericDelaporte Oct 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test case was using directly the NH0000 entity.

using NUnit.Framework;

namespace NHibernate.Test.NHSpecificTest.NH2218
Expand Down
2 changes: 1 addition & 1 deletion src/NHibernate.Test/NHSpecificTest/NH2218/Mappings.hbm.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="NHibernate.Test" namespace="NHibernate.Test.NHSpecificTest.NH0000">
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="NHibernate.Test" namespace="NHibernate.Test.NHSpecificTest.NH2218">

<class name="Entity" entity-name="Entity1">
<id name="Id" generator="guid.comb" />
Expand Down