Unit Testing a class with an internal constructor
Nothing prevents you from testing internals. Simply make the internals of your code visible to the test suite, by using the InternalsVisibleTo attribute: in the AssemblyInfo, add
[assembly:InternalsVisibleTo("TestSuiteAssembly")]
You could just make your unit test class inherit from Session (assuming your test framework doesn't require that you inherit from a specific class). For instance, with NUnit :
[TestFixture]
public class SessionTest : Session
{
public SessionTest()
: base() // call protected constructor
{
}
[Test]
public void TestSomething()
{
}
}