DynamoDS/Dynamo — pull request #2221 by Randy-Ma (2014-08-25 09:17:24+00:00)
Title: Fix nunit tests caused by null session

@ke-yu

What HostFactory.Instance.SetUp() is called, it requires a session to be present in the Application.Instance object. But unfortunately, it is reset to null after preload is completed. This will cause the geometry factory file path set incorrectly and result in a lot of failed test cases in RevitNodesTest.

This submission creates a temporary session class. In the SetUp method, we create a temporary session object and call OnBeginExecution to pass the session object to the application. In the TearDown method, we call OnEndExecution to reset the session object.