Пример #1
0
 public void Setup()
 {
     mr = new MockRepository();
     mh = new HunkMaker();
     var cfgSvc = mr.Stub<IConfigurationService>();
     var opEnv = mr.Stub<OperatingEnvironment>();
     cfgSvc.Stub(c => c.GetEnvironment("amigaOS")).Return(opEnv);
     cfgSvc.Stub(c => c.GetArchitecture("m68k")).Return(new M68kArchitecture());
     opEnv.Stub(o => o.Load(null, null))
         .IgnoreArguments()
         .Do(new Func<IServiceProvider, IProcessorArchitecture, IPlatform>((sp, arch) =>
         new AmigaOSPlatform(sp, arch)));
     sc = new ServiceContainer();
     sc.AddService<IConfigurationService>(cfgSvc);
 }
Пример #2
0
        public void Setup()
        {
            mr = new MockRepository();
            mh = new HunkMaker();
            var cfgSvc = mr.Stub <IConfigurationService>();
            var opEnv  = mr.Stub <OperatingEnvironment>();

            cfgSvc.Stub(c => c.GetEnvironment("amigaOS")).Return(opEnv);
            cfgSvc.Stub(c => c.GetArchitecture("m68k")).Return(new M68kArchitecture());
            opEnv.Stub(o => o.Load(null, null))
            .IgnoreArguments()
            .Do(new Func <IServiceProvider, IProcessorArchitecture, Platform>((sp, arch) =>
                                                                              new AmigaOSPlatform(sp, arch)));
            sc = new ServiceContainer();
            sc.AddService <IConfigurationService>(cfgSvc);
        }
Пример #3
0
        public void Setup()
        {
            mh = new HunkMaker();
            sc = new ServiceContainer();
            var cfgSvc = new Mock <IConfigurationService>();
            var opEnv  = new Mock <PlatformDefinition>();
            var tlSvc  = new Mock <ITypeLibraryLoaderService>();

            cfgSvc.Setup(c => c.GetEnvironment("amigaOS")).Returns(opEnv.Object);
            cfgSvc.Setup(c => c.GetArchitecture("m68k")).Returns(new M68kArchitecture(sc, "m68k"));
            opEnv.Setup(o => o.Load(
                            It.IsAny <IServiceProvider>(),
                            It.IsAny <IProcessorArchitecture>()))
            .Returns((IServiceProvider sp, IProcessorArchitecture arch) =>
                     new AmigaOSPlatform(sp, arch));
            opEnv.Setup(o => o.TypeLibraries).Returns(new List <TypeLibraryDefinition>());
            opEnv.Setup(o => o.CharacteristicsLibraries).Returns(new List <TypeLibraryDefinition>());
            sc.AddService <IConfigurationService>(cfgSvc.Object);
            sc.AddService <ITypeLibraryLoaderService>(tlSvc.Object);
        }
Пример #4
0
 public void Setup()
 {
     mh = new HunkMaker();
 }
Пример #5
0
 public void Setup()
 {
     hm = new HunkMaker();
 }
Пример #6
0
 public void Setup()
 {
     hm = new HunkMaker();
 }
Пример #7
0
 public void Setup()
 {
     mh = new HunkMaker();
 }