Ejemplo n.º 1
0
        public void NavigateToProcedure()
        {
            var proc = new Procedure(program.Architecture, "foo", Address.Ptr32(0x00123400), null);

            var codeSvc = new Mock <ICodeViewerService>();

            codeSvc.Setup(x => x.DisplayProcedure(program, proc, true)).Verifiable();

            var sc = new ServiceContainer();

            sc.AddService <ICodeViewerService>(codeSvc.Object);
            var nav = new ProcedureNavigator(program, proc, sc);

            nav.NavigateTo();
            codeSvc.VerifyAll();
        }
Ejemplo n.º 2
0
        public void NavigateToProcedure()
        {
            var proc = new Procedure("foo", null);

            var codeSvc = mr.DynamicMock <ICodeViewerService>();

            codeSvc.Expect(x => x.DisplayProcedure(
                               Arg <Procedure> .Is.Same(proc)));
            mr.ReplayAll();

            var sc = new ServiceContainer();

            sc.AddService <ICodeViewerService>(codeSvc);
            var nav = new ProcedureNavigator(proc, sc);

            nav.NavigateTo();
            mr.VerifyAll();
        }
Ejemplo n.º 3
0
        public void NavigateToProcedure()
        {
            var proc = new Procedure(program.Architecture, "foo", Address.Ptr32(0x00123400), null);

            var codeSvc = mr.DynamicMock <ICodeViewerService>();

            codeSvc.Expect(x => x.DisplayProcedure(
                               Arg <Program> .Is.Same(program),
                               Arg <Procedure> .Is.Same(proc),
                               Arg <bool> .Is.Equal(true)));
            mr.ReplayAll();

            var sc = new ServiceContainer();

            sc.AddService <ICodeViewerService>(codeSvc);
            var nav = new ProcedureNavigator(program, proc, sc);

            nav.NavigateTo();
            mr.VerifyAll();
        }