Пример #1
0
        public IXUnitSetupGenerator GetInstance(IClassUnderTestFinder classUnderTestFinder)
        {
            var classUnderTestNameFinder       = new ClassUnderTestNameFinder();
            var constructorParametersExtractor = new ConstructorParametersExtractor();
            var fieldFinder                  = new FieldFinder();
            var memberFinder                 = new MemberFinder();
            var constructorGenerator         = new ConstructorGenerator();
            var expressionStatementGenerator = new ExpressionStatementGenerator();
            var fieldNameGenerator           = new FieldNameGenerator();
            var fieldDeclarationGenerator    = new FieldDeclarationGenerator(fieldNameGenerator);
            var methodGenerator              = new MethodGenerator();
            var usingDirectivesGenerator     = new UsingDirectivesGenerator();

            var setupMethodBodyBuilder = new SetupMethodBodyBuilder(constructorParametersExtractor, expressionStatementGenerator, fieldNameGenerator);

            return(new XUnitSetupGenerator(classUnderTestNameFinder, classUnderTestFinder, constructorParametersExtractor, fieldDeclarationGenerator, setupMethodBodyBuilder, constructorGenerator, usingDirectivesGenerator, memberFinder, fieldFinder));
        }
 public ExpressionStatementGeneratorTests_MoqTargetObjectAssignmentExpression()
 {
     _target = new ExpressionStatementGenerator();
 }
 public ExpressionStatementGeneratorTests_MockRepositoryGenerateStub()
 {
     _target = new ExpressionStatementGenerator();
 }
 public ExpressionStatementGeneratorTests_MoqStub()
 {
     _target = new ExpressionStatementGenerator();
 }