Example #1
0
        public MockingContext AddMockGenerator(IMockGenerator mockGenerator)
        {
            if (mockGenerator == null)
            {
                throw new ArgumentNullException("mockGenerator");
            }

            mockGenerators.Add(mockGenerator);

            return this;
        }
Example #2
0
 public NunitTestClassGenerator(IMockGenerator mockGenerator)
     : base(mockGenerator)
 {
 }
Example #3
0
        public MockingContext SetDefaultMockGenerator(IMockGenerator mockGenerator)
        {
            if (mockGenerator == null)
            {
                throw new ArgumentNullException("mockGenerator");
            }

            DefaultMockGenerator = mockGenerator;
            return this;
        }
Example #4
0
        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)
 {
 }