コード例 #1
0
        private void GenerateAutoFixtureCustomization(Entity entity)
        {
            var filePath = configuration.TestNameSpace + "\\AutoFixtureCustomization.cs";
            var fileMerger = new FileMerger(fileSystem);

            var codeSnippet = AutoFixtureCustomizationCodeSnippet(entity);

            fileMerger.InsertLineIntoMethod(filePath, codeSnippet, "Customize", "Customize<" + entity.Name + ">");

            string @namespace = "using " + configuration.CoreNameSpace + ".Domain.Model;";
            fileMerger.InsertFirstLine(filePath, @namespace, @namespace);
        }
コード例 #2
0
ファイル: FileMergerTests.cs プロジェクト: skaarup/Draupner
 public void SetUp()
 {
     fileSystemMock = MockRepository.GenerateMock<IFileSystem>();
     fileMerger = new FileMerger(fileSystemMock);
 }
コード例 #3
0
ファイル: AutoMapperHelper.cs プロジェクト: skaarup/Draupner
 public AutoMapperHelper(IFileSystem fileSystem, IConfiguration configuration)
 {
     this.configuration = configuration;
     fileMerger = new FileMerger(fileSystem);
 }
コード例 #4
0
 public DepencyInjectionManager(IFileSystem fileSystem, IConfiguration configuration)
 {
     this.configuration = configuration;
     fileMerger = new FileMerger(fileSystem);
 }