Skip to content

Latest commit

 

History

History
520 lines (466 loc) · 21.6 KB

Atc.XUnit.md

File metadata and controls

520 lines (466 loc) · 21.6 KB

Atc.XUnit


AtcXUnitAssemblyTypeInitializer

public static class AtcXUnitAssemblyTypeInitializer

CodeComplianceDocumentationHelper

CodeComplianceDocumentationHelper.

public static class CodeComplianceDocumentationHelper

Static Methods

AssertExportedTypeWithMissingComments

void AssertExportedTypeWithMissingComments(Type type)

Summary: Asserts the exported type with missing comments.

Parameters:
     type  -  The type.

AssertExportedTypesWithMissingComments

void AssertExportedTypesWithMissingComments(Assembly assembly, List<Type> excludeTypes = null)

Summary: Asserts the exported types with missing comments.

Parameters:
     assembly  -  The assembly.
     excludeTypes  -  The exclude types.


CodeComplianceHelper

CodeComplianceNamingHelper.

public static class CodeComplianceHelper

Static Methods

AssertExportedTypesWithWrongDefinitions

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].

AssertExportedTypesWithWrongDefinitions

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].

AssertLocalizationResources

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.

AssertLocalizationResourcesForInvalidKeysSuffixWithPlaceholders

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.

AssertLocalizationResourcesForMissingTranslations

void AssertLocalizationResourcesForMissingTranslations(Assembly assembly, IList<string> cultureNames)

Summary: Asserts the localization resources with missing translations.

Parameters:
     assembly  -  The assembly.
     cultureNames  -  The culture names.


CodeComplianceTestHelper

CodeComplianceTestHelper.

public static class CodeComplianceTestHelper

Static Methods

AssertExportedMethodsWithMissingTests

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].

AssertExportedMethodsWithMissingTests

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].

AssertExportedMethodsWithMissingTests

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].

CollectExportedMethodsWithMissingTestsAndGenerateText

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].

CollectExportedMethodsWithMissingTestsAndGenerateTextLines

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].

CollectExportedMethodsWithMissingTestsFromAssembly

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.

CollectExportedMethodsWithMissingTestsToExcel

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.

CollectExportedMethodsWithMissingTestsToExcel

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.

CollectExportedTypesWithMissingTests

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.

CollectExportedTypesWithMissingTestsAndGenerateText

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

DecompilerType.

public enum DecompilerType
Value Name Description Summary
0 AbstractSyntaxTree Abstract Syntax Tree The abstract syntax tree
1 MonoReflection Mono Reflection The mono reflection

IntegrationTestCliBase

public abstract class IntegrationTestCliBase

Static Methods

GetAppSettingsFileForCli

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));

GetAppSettingsFileForCli

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));

GetAppSettingsFileForCli

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));

GetExecutableFileForCli

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));

GetExecutableFileForCli

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));

GetExecutableFileForCli

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));

SerializeAndDeserializeHelper

public static class SerializeAndDeserializeHelper

Static Methods

Assert

void Assert(object obj)

TestResult

TestResult.

public class TestResult

Properties

IndentLevel

IndentLevel

Summary: Gets the indent level.

IsError

IsError

Summary: Gets a value indicating whether this instance is error.

SubLines

SubLines

Summary: Gets the sub lines.

Text

Text

Summary: Gets the text.

Methods

ToString

string ToString()

Summary: Converts to string.

Returns: A string that represents this instance.


TestResultHelper

TestResultHelper.

public static class TestResultHelper

Static Methods

AssertOnTestResults

void AssertOnTestResults(IReadOnlyCollection<TestResult> testResults)

Summary: Asserts the on test results.

Parameters:
     testResults  -  The test results.

AssertOnTestResultsFromMethodsWithMissingTests

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].

AssertOnTestResultsFromMethodsWithWrongDefinitions

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].

AssertOnTestResultsFromMissingTranslationsAndInvalidKeysSuffixWithPlaceholders

void AssertOnTestResultsFromMissingTranslationsAndInvalidKeysSuffixWithPlaceholders(string assemblyName, IDictionary<string, Dictionary<string, List<string>>> missingTranslations, IDictionary<string, Dictionary<string, List<string>>> invalidKeysSuffixWithPlaceholders)

ToExcelTestResultsFromMethodsWithMissingTests

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.


Traits

public static class Traits

Static Fields

Category

string Category

Generated by MarkdownCodeDoc version 1.2