Exemplo n.º 1
0
        public BasicTypesResolvationTests()
        {
            _context = new ExportContext(new[] { Assembly.GetExecutingAssembly() })
            {
                TargetDirectory = "targetDir/"
            };
            var exporter = new TsExporter(_context);

            exporter.Initialize();
            _tr       = _context.CreateExportedFile().TypeResolver;
            _comparer = new TypeNameEqualityComparer();
        }
        public BasicTypesResolvationTests()
        {
            _context = new ExportContext()
            {
                SourceAssemblies = new[] { Assembly.GetExecutingAssembly() },
                TargetDirectory  = "D:\\"
            };
            var exporter = new TsExporter(_context);

            exporter.Initialize();
            _tr       = exporter.SetupExportedFile().TypeResolver;
            _comparer = new TypeNameEqualityComparer();
        }
        protected TestInitializationData InitializeMultipleFiles(Action <ConfigurationBuilder> configuration)
        {
            MockFileOperations mfo = new MockFileOperations();

            ExportContext ec = new ExportContext(new Assembly[] { Assembly.GetExecutingAssembly(), typeof(TestFluentAssembly.TwoInterfaces.IInterface1).Assembly }, mfo)
            {
                ConfigurationMethod = configuration,
                Hierarchical        = true,
                TargetDirectory     = TargetDir
            };
            TsExporter te = new TsExporter(ec);

            te.Initialize();
            return(new TestInitializationData(mfo, te));
        }
        protected TestInitializationData InitializeSingleFile(Action <ConfigurationBuilder> configuration)
        {
            MockFileOperations mfo = new MockFileOperations();

            ExportContext ec = new ExportContext(mfo)
            {
                ConfigurationMethod = configuration,
                Hierarchical        = false,
                SourceAssemblies    = new Assembly[] { Assembly.GetExecutingAssembly(), typeof(TestFluentAssembly.TwoInterfaces.IInterface1).Assembly },
                TargetDirectory     = "D:\\",
                TargetFile          = Sample
            };
            TsExporter te = new TsExporter(ec);

            te.Initialize();
            return(new TestInitializationData(mfo, te));
        }