Exemplo n.º 1
0
        public void Setup()
        {
            mockFactory = new CommonMockFactory();
            var sc = new ServiceContainer();

            arch     = new X86ArchitectureFlat32(sc, "x86-protected-32");
            platform = new Win32Platform(sc, arch);
        }
        public void Setup()
        {
            this.mockFactory = new CommonMockFactory();
            var platform = mockFactory.CreateMockPlatform();

            platform.Setup(p => p.CreateCParser(It.IsAny <TextReader>(), It.IsAny <ParserState>()))
            .Returns(new Func <TextReader, ParserState, CParser>((r, s) =>
            {
                var lex = new CLexer(r, CLexer.MsvcKeywords);
                return(new CParser(s ?? new ParserState(), lex));
            }));
            this.program = new Program
            {
                Platform     = platform.Object,
                Architecture = platform.Object.Architecture,
            };
        }
Exemplo n.º 3
0
 public void Setup()
 {
     this.mockFactory = new CommonMockFactory();
     this.platform    = mockFactory.CreateMockPlatform().Object;
     this.program     = mockFactory.CreateProgram();
 }
Exemplo n.º 4
0
 public void Setup()
 {
     mockFactory = new CommonMockFactory();
     arch        = new X86ArchitectureFlat32("x86-protected-32");
     platform    = new Win32Platform(null, arch);
 }