public void InterfaceDummy() { var dummy = TestDummyGenerator.Create <IDomainObj>(); Assert.That(dummy, Is.Not.Null); Assert.Throws <TestDummyException>(() => dummy.DoSomething()); }
public override IWindowsRegistry GetWindowsRegistry() { if (_windowsRegistry == null) { _windowsRegistry = TestDummyGenerator.Create <IWindowsRegistry>(); } return(_windowsRegistry); }
IVSFake CreateVsFake(IGameletClientFactory gameletClientFactory) { var serviceManager = new MediumTestServiceManager(_taskContext, CreateVsiOptions()); _compRoot = new MediumTestDebugEngineFactoryCompRoot( serviceManager, _taskContext, gameletClientFactory, TestDummyGenerator.Create <IWindowsRegistry>()); IDebugEngine2 CreateDebugEngine() => _compRoot.CreateDebugEngineFactory().Create(null); InitVsFakeCompRoot(serviceManager, gameletClientFactory); return(_vsFakeCompRoot.Create(CreateDebugEngine)); }
public void TestDebugEngineConstructor() { var lldbShell = TestDummyGenerator.Create <SLLDBShell>(); var vsiService = new YetiVSIService(OptionPageGrid.CreateForTesting()); var metrics = TestDummyGenerator.Create <IMetrics>(); var vsOutputWindow = new OutputWindowStub(); var symbolSettingsManager = Substitute.For <IVsDebuggerSymbolSettingsManager120A>(); var serviceManager = new ServiceManagerStub(metrics, lldbShell, vsiService, vsOutputWindow, symbolSettingsManager); var compRoot = new MediumTestDebugEngineFactoryCompRoot( serviceManager, new JoinableTaskContext(), new GameletClientStub.Factory(), TestDummyGenerator.Create <IWindowsRegistry>()); var factory = compRoot.CreateDebugEngineFactory(); factory.Create(null); }
DebugEngineFactoryCompRootStub CreateEngineFactoryCompRoot( IDebugSessionLauncherFactory debugSessionLauncherFactory, IRemoteDeploy remoteDeploy) { var compRoot = new DebugEngineFactoryCompRootStub( debugSessionLauncherFactory, remoteDeploy, Substitute.For <IGameLauncher>()); _metrics = Substitute.For <IMetrics>(); _metrics.NewDebugSessionId().Returns(_debugSessionId); ISessionNotifier sessionNotifier = Substitute.For <ISessionNotifier>(); SLLDBShell lldbShell = TestDummyGenerator.Create <SLLDBShell>(); var vsiService = new YetiVSIService(OptionPageGrid.CreateForTesting()); var vsOutputWindow = new OutputWindowStub(); var symbolSettingsManager = Substitute.For <IVsDebuggerSymbolSettingsManager120A>(); compRoot.ServiceManager = new ServiceManagerStub(_metrics, lldbShell, vsiService, vsOutputWindow, symbolSettingsManager, sessionNotifier); return(compRoot); }
public void SetUp() { _optionPageGrid = OptionPageGrid.CreateForTesting(); _optionPageGrid.NatvisLoggingLevel = NatvisLoggingLevelFeatureFlag.VERBOSE; var taskContext = new JoinableTaskContext(); var serviceManager = new FakeServiceManager(taskContext); serviceManager.AddService(typeof(YetiVSIService), new YetiVSIService(_optionPageGrid)); _compRoot = new MediumTestDebugEngineFactoryCompRoot( serviceManager, taskContext, new GameletClientStub.Factory(), TestDummyGenerator.Create <IWindowsRegistry>()); _varInfoFactory = _compRoot.GetLldbVariableInformationFactory(); _nLogSpy = _compRoot.GetNatvisDiagnosticLogSpy(); _nLogSpy.Attach(); _evaluator = _compRoot.GetNatvisExpressionEvaluator(); }
public override IWindowsRegistry GetWindowsRegistry() => _windowsRegistry ?? (_windowsRegistry = TestDummyGenerator.Create <IWindowsRegistry>());
public void ClassWithNonVirtualFunction() { Assert.Throws <ArgumentException>( () => TestDummyGenerator.Create <DomainObjWithNonVirtualMethod>()); }