Skip to content

Latest commit

 

History

History
59 lines (47 loc) · 2.71 KB

README.md

File metadata and controls

59 lines (47 loc) · 2.71 KB

Enum.Assert

Project Description

This library allows you to easily generate unit tests for your enum types. It contains a single public class called "TestWriter" with four static methods that can be used to generate unit tests for enums in different ways.

The namespace for the library is "TestCreator.Core". The library uses two enums called "AssertType" and "UnitTestFrameworkType" to specify the type of assertions to be used in the generated unit tests and the type of unit test framework to use, respectively.Creative Code With ErshadRaoufi

Overview

The "TestWriter" class contains four static methods for generating unit tests:
static void CreateUnitTestFilesFromAssemblies(
            string path,
            string[] selectedAssembly,
            AssertType assertType = AssertType.Assert,
            UnitTestFrameworkType unitTestFrameworkType = UnitTestFrameworkType.XUnit,
            bool overWriteTests = false)
static void CreateUnitTestFilesFromAssemblies(
            string path,
            string[] selectedAssembly,
            BaseUnitTestWriter baseUnitTestWriter,
            bool overWriteTests = false)
static void CreateUnitTestFilesFromAssemblies(
            IDictionary selectedAssembly,
            AssertType assertType = AssertType.Assert,
            UnitTestFrameworkType unitTestFrameworkType = UnitTestFrameworkType.XUnit,
            bool overWriteTests = false))
static void CreateUnitTestFilesFromAssemblies(
            IDictionary selectedAssembly,
            BaseUnitTestWriter baseUnitTestWriter,
            bool overWriteTests = false)
overLoad Of Extensions for IServiceCollection:
static void WriteUnitTest(this IServiceCollection services,
            string path,
            string[] selectedAssembly,
            AssertType assertType,
            UnitTestFrameworkType unitTestFrameworkType,
            bool overWriteTests = false)
static void WriteUnitTest(this IServiceCollection services,
            IDictionary selectedAssembly,
            AssertType assertType,
            UnitTestFrameworkType unitTestFrameworkType,
            bool overWriteTests = false)
static void WriteUnitTest(this IServiceCollection services,
            string path,
            string[] selectedAssembly,
            BaseUnitTestWriter baseUnitTestWriter,
            bool overWriteTests = false)
static void WriteUnitTest(this IServiceCollection services,
            IDictionary selectedAssembly,
            BaseUnitTestWriter baseUnitTestWriter,
            bool overWriteTests = false)