public MockingContext AddMockGenerator(IMockGenerator mockGenerator) { if (mockGenerator == null) { throw new ArgumentNullException("mockGenerator"); } mockGenerators.Add(mockGenerator); return this; }
public NunitTestClassGenerator(IMockGenerator mockGenerator) : base(mockGenerator) { }
public MockingContext SetDefaultMockGenerator(IMockGenerator mockGenerator) { if (mockGenerator == null) { throw new ArgumentNullException("mockGenerator"); } DefaultMockGenerator = mockGenerator; return this; }
public static IUnitTestClassGenerator GetUnitTestGenerator(TestFrameworks testFramework, IMockGenerator mockGenerator) { switch (testFramework) { case TestFrameworks.MsTest: return(new MsTestClassGenerator(mockGenerator)); case TestFrameworks.NUnit: return(new NunitTestClassGenerator(mockGenerator)); default: throw new ArgumentOutOfRangeException(nameof(testFramework), testFramework, null); } }
protected UnitTestClassGenerator(IMockGenerator mockGenerator) { _mockGenerator = mockGenerator; _usings = new List <string>(); }
public MsTestClassGenerator(IMockGenerator mockGenerator) : base(mockGenerator) { }