Method | Description | |
---|---|---|
GetDifferingTypeFullname ( |
Get the differing namespace part between object to test and unit test module, seen relative from the ShortestNamespace, prefixed with the specified string.
|
|
InsertAfterShortestNamespace ( |
Insert the specified extra string into the namespace of a specified type, relative to the ShortestNamespace. If the full qualified name of the input type is "NStub.CSharp.BuildContext.SetupAndTearDownContext" and the shortest (the root namespace of the library to test) namespace is "NStub.CSharp", then the output of this method is "NStub.CSharp.Tests.BuildContext.SetupAndTearDownContext", inserting the testNamespacePart between the ShortestNamespace and the rest of the full qualified name of inputType. Simply add "Test" at the end to it an you have the full qualified name to your test class. |
|
NamespaceDetector ( |
Initializes a new instance of the NamespaceDetector class.
|
|
PrepareNamespaceImports ( IEnumerable |
Prepares the specified namespace imports to prevent collisions with the types under test. This method detects problematic Take a look at the 'using MbUnit.Framework' import. In that way it conflicts with the 'NStub.CSharp.MbUnit' import and circumvents the name resolution of the TestAttribute. This method detects such concerns and puts a global:: prefix in front of the 'MbUnit.Framework' namespace import. |
Method | Description | |
---|---|---|
DetermineShortestNamespace ( IEnumerable |
Determines the shortest namespace from a list of type declarations.
|
|
PrepareNamespace ( string ns ) : string |
Prepares and caches a namespace.
|
public GetDifferingTypeFullname ( |
||
inputType | The type with the input namespace. | |
testNamespacePart | string | The additional namespace part of the test project, e.g. ".Test". |
return | string |
public InsertAfterShortestNamespace ( |
||
inputType | The type with the input namespace. | |
testNamespacePart | string | The additional namespace part of the test project, e.g. ".Test". |
return | string |
public NamespaceDetector ( |
||
typeDeclarations | The type declarations to investigate. | |
return | System |
public PrepareNamespaceImports ( IEnumerable |
||
imports | IEnumerable |
The namespace imports. |
return | IEnumerable |