public static class AtcXUnitAssemblyTypeInitializer
CodeComplianceDocumentationHelper.
public static class CodeComplianceDocumentationHelper
void AssertExportedTypeWithMissingComments(Type type)Summary: Asserts the exported type with missing comments.
Parameters:
type
- The type.
void AssertExportedTypesWithMissingComments(Assembly assembly, List<Type> excludeTypes = null)Summary: Asserts the exported types with missing comments.
Parameters:
assembly
- The assembly.
excludeTypes
- The exclude types.
CodeComplianceNamingHelper.
public static class CodeComplianceHelper
void AssertExportedTypesWithWrongDefinitions(Type type, bool useFullName = False)Summary: Asserts the exported types with wrong definitions.
Parameters:
type
- The type.
useFullName
- if set to true [use full name].
void AssertExportedTypesWithWrongDefinitions(Assembly assembly, List<Type> excludeTypes = null, bool useFullName = False)Summary: Asserts the exported types with wrong definitions.
Parameters:
type
- The type.
useFullName
- if set to true [use full name].
void AssertLocalizationResources(Assembly assembly, IList<string> cultureNames, IList<string> allowSuffixTermsForKeySuffixWithPlaceholders = null)Summary: Asserts the localization resources with missing translations or invalid keys with placeholders in value.
Parameters:
assembly
- The assembly.
cultureNames
- The culture names.
allowSuffixTermsForKeySuffixWithPlaceholders
- The allow suffix terms for key suffix with placeholders.
void AssertLocalizationResourcesForInvalidKeysSuffixWithPlaceholders(Assembly assembly, IList<string> cultureNames, IList<string> allowSuffixTermsForKeySuffixWithPlaceholders = null)Summary: Asserts the localization resources with invalid keys with placeholders in value.
Parameters:
assembly
- The assembly.
cultureNames
- The culture names.
allowSuffixTermsForKeySuffixWithPlaceholders
- The allow suffix terms for key suffix with placeholders.
void AssertLocalizationResourcesForMissingTranslations(Assembly assembly, IList<string> cultureNames)Summary: Asserts the localization resources with missing translations.
Parameters:
assembly
- The assembly.
cultureNames
- The culture names.
CodeComplianceTestHelper.
public static class CodeComplianceTestHelper
void AssertExportedMethodsWithMissingTests(DecompilerType decompilerType, Type sourceType, Type testType, bool useFullName = False)Summary: Asserts the exported methods with missing tests.
Parameters:
decompilerType
- The decompiler type.
sourceType
- Type of the source.
testType
- Type of the test.
useFullName
- if set to true [use full name].
void AssertExportedMethodsWithMissingTests(DecompilerType decompilerType, Type sourceType, Assembly testAssembly, bool useFullName = False)Summary: Asserts the exported methods with missing tests.
Parameters:
decompilerType
- The decompiler type.
sourceType
- Type of the source.
testType
- Type of the test.
useFullName
- if set to true [use full name].
void AssertExportedMethodsWithMissingTests(DecompilerType decompilerType, Assembly sourceAssembly, Assembly testAssembly, List<Type> excludeSourceTypes = null, bool useFullName = False)Summary: Asserts the exported methods with missing tests.
Parameters:
decompilerType
- The decompiler type.
sourceType
- Type of the source.
testType
- Type of the test.
useFullName
- if set to true [use full name].
string CollectExportedMethodsWithMissingTestsAndGenerateText(DecompilerType decompilerType, Assembly sourceAssembly, Assembly testAssembly, List<Type> excludeSourceTypes = null, bool useFullName = False)Summary: Collects the exported methods with missing tests and generate text.
Parameters:
decompilerType
- The decompiler type.
sourceAssembly
- The source assembly.
testAssembly
- The test assembly.
excludeSourceTypes
- The exclude source types.
useFullName
- if set to true [use full name].
string[] CollectExportedMethodsWithMissingTestsAndGenerateTextLines(DecompilerType decompilerType, Assembly sourceAssembly, Assembly testAssembly, List<Type> excludeSourceTypes = null, bool useFullName = False)Summary: Collects the exported methods with missing tests and generate text lines.
Parameters:
decompilerType
- The decompiler type.
sourceAssembly
- The source assembly.
testAssembly
- The test assembly.
excludeSourceTypes
- The exclude source types.
useFullName
- if set to true [use full name].
MethodInfo[] CollectExportedMethodsWithMissingTestsFromAssembly(DecompilerType decompilerType, Assembly sourceAssembly, Assembly testAssembly, List<Type> excludeSourceTypes = null)Summary: Collects the exported methods with missing tests from assembly.
Parameters:
decompilerType
- The decompiler type.
sourceAssembly
- The source assembly.
testAssembly
- The test assembly.
excludeSourceTypes
- The exclude source types.
void CollectExportedMethodsWithMissingTestsToExcel(DecompilerType decompilerType, Assembly sourceAssembly, Assembly testAssembly, List<Type> excludeSourceTypes = null)Summary: Collects the exported methods with missing tests to excel.
Parameters:
decompilerType
- The decompiler type.
sourceAssembly
- The source assembly.
testAssembly
- The test assembly.
excludeSourceTypes
- The exclude source types.
void CollectExportedMethodsWithMissingTestsToExcel(DecompilerType decompilerType, DirectoryInfo reportDirectory, Assembly sourceAssembly, Assembly testAssembly, List<Type> excludeSourceTypes = null)Summary: Collects the exported methods with missing tests to excel.
Parameters:
decompilerType
- The decompiler type.
sourceAssembly
- The source assembly.
testAssembly
- The test assembly.
excludeSourceTypes
- The exclude source types.
Type[] CollectExportedTypesWithMissingTests(DecompilerType decompilerType, Assembly sourceAssembly, Assembly testAssembly, List<Type> excludeSourceTypes = null)Summary: Collects the exported types with missing tests.
Parameters:
decompilerType
- The decompiler type.
sourceAssembly
- The source assembly.
testAssembly
- The test assembly.
excludeSourceTypes
- The exclude source types.
string CollectExportedTypesWithMissingTestsAndGenerateText(DecompilerType decompilerType, Assembly sourceAssembly, Assembly testAssembly, List<Type> excludeSourceTypes = null, bool useFullName = False)Summary: Collects the exported types with missing tests and generate text.
Parameters:
decompilerType
- The decompiler type.
sourceAssembly
- The source assembly.
testAssembly
- The test assembly.
excludeSourceTypes
- The exclude source types.
useFullName
- if set to true [use full name].
DecompilerType.
public enum DecompilerType
Value | Name | Description | Summary |
---|---|---|---|
0 | AbstractSyntaxTree | Abstract Syntax Tree | The abstract syntax tree |
1 | MonoReflection | Mono Reflection | The mono reflection |
public abstract class IntegrationTestCliBase
FileInfo GetAppSettingsFileForCli(Type programTypeForCliExe, string pathFolderNameFilter)Summary: Gets the filePath to CLI-Exe file's 'appsettings.json'.
Parameters:
programTypeForCliExe
- The program type for the cli executable.
pathFolderNameFilter
- Path should include this folder name.Returns: The filePath to CLI-Exe file's 'appsettings.json'.
Remarks: This method will throw exceptions if the CLI-Exe file don't exist or finds too many locations. In case of "too many", please narrow down by using a more specific "searchFrom" path.
Code usage:
FileInfo appSettingsFile = GetAppSettingsFileForCli(programTypeForCliExe);Code example:
var appSettingsFile = GetAppSettingsFileForCli(typeof(global::Demo.Atc.Console.Spectre.Cli.Program));
FileInfo GetAppSettingsFileForCli(Type programTypeForCliExe, string searchFromSubFolderName, string pathFolderNameFilter)Summary: Gets the filePath to CLI-Exe file's 'appsettings.json'.
Parameters:
programTypeForCliExe
- The program type for the cli executable.
pathFolderNameFilter
- Path should include this folder name.Returns: The filePath to CLI-Exe file's 'appsettings.json'.
Remarks: This method will throw exceptions if the CLI-Exe file don't exist or finds too many locations. In case of "too many", please narrow down by using a more specific "searchFrom" path.
Code usage:
FileInfo appSettingsFile = GetAppSettingsFileForCli(programTypeForCliExe);Code example:
var appSettingsFile = GetAppSettingsFileForCli(typeof(global::Demo.Atc.Console.Spectre.Cli.Program));
FileInfo GetAppSettingsFileForCli(Type programTypeForCliExe, DirectoryInfo searchFromPath)Summary: Gets the filePath to CLI-Exe file's 'appsettings.json'.
Parameters:
programTypeForCliExe
- The program type for the cli executable.
pathFolderNameFilter
- Path should include this folder name.Returns: The filePath to CLI-Exe file's 'appsettings.json'.
Remarks: This method will throw exceptions if the CLI-Exe file don't exist or finds too many locations. In case of "too many", please narrow down by using a more specific "searchFrom" path.
Code usage:
FileInfo appSettingsFile = GetAppSettingsFileForCli(programTypeForCliExe);Code example:
var appSettingsFile = GetAppSettingsFileForCli(typeof(global::Demo.Atc.Console.Spectre.Cli.Program));
FileInfo GetExecutableFileForCli(Type programTypeForCliExe, string pathFolderNameFilter)Summary: Gets the filePath to CLI-Exe file.
Parameters:
programTypeForCliExe
- The program type for the cli executable.
pathFolderNameFilter
- Path should include this folder name.Returns: The filePath to CLI-Exe file.
Remarks: This method will throw exceptions if the CLI-Exe file don't exist or finds too many locations. In case of "too many", please narrow down by using a more specific "searchFrom" path.
Code usage:
FileInfo cliFile = GetExecutableFileForCli(programTypeForCliExe);Code example:
var cliFile = GetExecutableFileForCli(typeof(global::Demo.Atc.Console.Spectre.Cli.Program));
FileInfo GetExecutableFileForCli(Type programTypeForCliExe, string searchFromSubFolderName, string pathFolderNameFilter)Summary: Gets the filePath to CLI-Exe file.
Parameters:
programTypeForCliExe
- The program type for the cli executable.
pathFolderNameFilter
- Path should include this folder name.Returns: The filePath to CLI-Exe file.
Remarks: This method will throw exceptions if the CLI-Exe file don't exist or finds too many locations. In case of "too many", please narrow down by using a more specific "searchFrom" path.
Code usage:
FileInfo cliFile = GetExecutableFileForCli(programTypeForCliExe);Code example:
var cliFile = GetExecutableFileForCli(typeof(global::Demo.Atc.Console.Spectre.Cli.Program));
FileInfo GetExecutableFileForCli(Type programTypeForCliExe, DirectoryInfo searchFromPath, string pathFolderNameFilter)Summary: Gets the filePath to CLI-Exe file.
Parameters:
programTypeForCliExe
- The program type for the cli executable.
pathFolderNameFilter
- Path should include this folder name.Returns: The filePath to CLI-Exe file.
Remarks: This method will throw exceptions if the CLI-Exe file don't exist or finds too many locations. In case of "too many", please narrow down by using a more specific "searchFrom" path.
Code usage:
FileInfo cliFile = GetExecutableFileForCli(programTypeForCliExe);Code example:
var cliFile = GetExecutableFileForCli(typeof(global::Demo.Atc.Console.Spectre.Cli.Program));
public static class SerializeAndDeserializeHelper
void Assert(object obj)
TestResult.
public class TestResult
IndentLevelSummary: Gets the indent level.
IsErrorSummary: Gets a value indicating whether this instance is error.
SubLinesSummary: Gets the sub lines.
TextSummary: Gets the text.
string ToString()Summary: Converts to string.
Returns: A string that represents this instance.
TestResultHelper.
public static class TestResultHelper
void AssertOnTestResults(IReadOnlyCollection<TestResult> testResults)Summary: Asserts the on test results.
Parameters:
testResults
- The test results.
void AssertOnTestResultsFromMethodsWithMissingTests(string assemblyName, MethodInfo[] methodsWithMissingTests, bool useFullName = False)Summary: Asserts the on test results from methods with missing tests.
Parameters:
assemblyName
- Name of the assembly.
methodsWithMissingTests
- The methods with missing tests.
useFullName
- if set to true [use full name].
void AssertOnTestResultsFromMethodsWithWrongDefinitions(string assemblyName, IDictionary<MethodInfo, string> methodsWithWrongNaming, bool useFullName = False)Summary: Asserts the on test results from methods with wrong definitions.
Parameters:
assemblyName
- Name of the assembly.
methodsWithWrongNaming
- The methods with wrong naming.
useFullName
- if set to true [use full name].
void AssertOnTestResultsFromMissingTranslationsAndInvalidKeysSuffixWithPlaceholders(string assemblyName, IDictionary<string, Dictionary<string, List<string>>> missingTranslations, IDictionary<string, Dictionary<string, List<string>>> invalidKeysSuffixWithPlaceholders)
void ToExcelTestResultsFromMethodsWithMissingTests(DirectoryInfo reportDirectory, string assemblyName, MethodInfo[] methodsWithMissingTests)Summary: To Excel with the test results from methods with missing tests.
Parameters:
reportDirectory
- The report directory.
assemblyName
- Name of the assembly.
methodsWithMissingTests
- The methods with missing tests.
public static class Traits
string Category