public StateTest() { this.stateMachineInformation = A.Fake <IStateMachineInformation <States, Events> >(); this.extensionHost = A.Fake <IExtensionHost <States, Events> >(); this.testee = new State <States, Events>(States.A, this.stateMachineInformation, this.extensionHost); }
public bool Install(IExtensionHost host) { SuiteBuildersProxy suiteBuilders = new SuiteBuildersProxy(host); suiteBuilders.Install(new GenericFixtureBuilder(), false); return(true); }
public bool Install(IExtensionHost host) { IExtensionPoint extensionPoint = host.GetExtensionPoint("SuiteBuilders"); if (extensionPoint == null) return false; extensionPoint.Install(this); return true; }
public bool Install(IExtensionHost host) { if (host == null) { return(false); } var listeners = host.GetExtensionPoint("EventListeners"); if (listeners == null) { return(false); } listeners.Install(this); //XmlConfigurator.Configure(new FileInfo("Log.config")); //var exeConfigPath = new Uri(typeof(NUnitListenerAddin).Assembly.Location).LocalPath; //Debug.Print(string.Format("Assembly config path: {0}", exeConfigPath)); //WalmartEnvConfig.GetEnvFromAppConfig(ConfigurationManager.OpenExeConfiguration(exeConfigPath).AppSettings.Settings["Environment"].Value); return(true); }
public StateTest() { this.stateMachineInformation = A.Fake<IStateMachineInformation<States, Events>>(); this.extensionHost = A.Fake<IExtensionHost<States, Events>>(); this.testee = new State<States, Events>(States.A, this.stateMachineInformation, this.extensionHost); }
public StateLogic( ITransitionLogic <TState, TEvent> transitionLogic, IExtensionHost <TState, TEvent> extensionHost) { this.extensionHost = extensionHost; this.transitionLogic = transitionLogic; }
public bool Install(IExtensionHost host) { var suiteBuilders = host.GetExtensionPoint("SuiteBuilders"); suiteBuilders.Install(this); return(true); }
public void Install_Failure() { #if NMOCK2 IExtensionHost extensionHostMock = (IExtensionHost)_mocks.NewMock(typeof(IExtensionHost)); RowTestAddIn addIn = new RowTestAddIn(); NMock2.Expect.Once.On(extensionHostMock) .Method("GetExtensionPoint").With("TestCaseBuilders") .Will(NMock2.Return.Value(null)); bool installed = addIn.Install(extensionHostMock); _mocks.VerifyAllExpectationsHaveBeenMet(); Assert.That(installed, Is.False); #else DynamicMock extensionHostMock = new DynamicMock(typeof(IExtensionHost)); IExtensionHost extensionHost = (IExtensionHost)extensionHostMock.MockInstance; RowTestAddIn addIn = new RowTestAddIn(); extensionHostMock.ExpectAndReturn("GetExtensionPoint", null, "TestCaseBuilders"); bool installed = addIn.Install(extensionHost); extensionHostMock.Verify(); Assert.That(installed, Is.False); #endif }
public bool Install(IExtensionHost host) { IExtensionPoint listeners = host.GetExtensionPoint("EventListeners"); listeners.Install(this); return(true); }
public bool Install(IExtensionHost host) { AppDomain.CurrentDomain.AssemblyResolve += (sender, args) => { var dir = Environment.CurrentDirectory; if (args.Name.IndexOf("Sybase.AdoNet2.AseClient") >= 0) { return(Assembly.LoadFrom(@"..\..\..\..\Redist\Sybase\Sybase.AdoNet2.AseClient.dll")); } if (args.Name.IndexOf("Oracle.DataAccess") >= 0) { return(Assembly.LoadFrom(@"..\..\..\..\Redist\Oracle\Oracle.DataAccess.dll")); } if (args.Name.IndexOf("IBM.Data.DB2") >= 0) { return(Assembly.LoadFrom(@"..\..\..\..\Redist\IBM\IBM.Data.DB2.dll")); } if (args.Name.IndexOf("Mono.Security") >= 0) { return(Assembly.LoadFrom(@"..\..\..\..\Redist\PostgreSql\Mono.Security.dll")); } return(null); }; return(true); }
/// <summary> /// Initializes a new instance of the <see cref="EventTopic"/> class. /// </summary> /// <param name="uri">The topic URI.</param> /// <param name="factory">Factory to create publications and subscriptions.</param> /// <param name="extensionHost">The extension host holding all extensions.</param> /// <param name="globalMatchersProvider">The global matchers provider.</param> public EventTopic(string uri, IFactory factory, IExtensionHost extensionHost, IGlobalMatchersProvider globalMatchersProvider) { this.uri = uri; this.factory = factory; this.extensionHost = extensionHost; this.globalMatchersProvider = globalMatchersProvider; }
public bool Install(IExtensionHost host) { var testDecorators = host.GetExtensionPoint("TestDecorators"); testDecorators.Install(this); return(true); }
public bool Install(IExtensionHost host) { var ext = host.GetExtensionPoint("EventListeners"); ext.Install(this); return(true); }
public bool Install(IExtensionHost host) { var tcBuilder = new FsCheckTestCaseBuider(); host.GetExtensionPoint("TestCaseBuilders").Install(tcBuilder); return(true); }
public bool Install(IExtensionHost host) { var listeners = host.GetExtensionPoint("EventListeners"); listeners.Install(new ProgressReporterEventListener()); return(true); }
public Transition(IStateMachineInformation <TState, TEvent> stateMachineInformation, IExtensionHost <TState, TEvent> extensionHost) { this.stateMachineInformation = stateMachineInformation; this.extensionHost = extensionHost; this.actions = new List <IActionHolder>(); }
public bool Install(IExtensionHost host) { //Debugger.Break(); if (host == null) throw new ArgumentNullException("host"); IExtensionPoint listeners = host.GetExtensionPoint("EventListeners"); if (listeners == null) return false; listeners.Install(this); // NiceToHave: inject configuration from configuration file var processName = Process.GetCurrentProcess().ProcessName; var perfCounterBuilders = new[] { new PerfCounterBuilder("Process", "Private Bytes", processName), new PerfCounterBuilder("Process", "Virtual Bytes", processName), new PerfCounterBuilder("Process", "Handle Count", processName), new PerfCounterBuilder("Process", "Thread Count", processName), new PerfCounterBuilder(".NET CLR Memory", "# Bytes in all Heaps", processName), new PerfCounterBuilder(".NET CLR Loading", "Current appdomains", processName) }; mPerfCollector = new PerfCollector(new CsvPerfLogger(@"c:\PerfLogs", @"nunit.csv", perfCounterBuilders), perfCounterBuilders); return true; }
public Registrar(IFactory factory, IEventTopicHost eventTopicHost, IEventInspector eventInspector, IExtensionHost extensionHost) { this.factory = factory; this.eventTopicHost = eventTopicHost; this.eventInspector = eventInspector; this.extensionHost = extensionHost; }
public TransitionLogic( IExtensionHost <TState, TEvent> extensionHost, IStateMachineInformation <TState, TEvent> stateMachineInformation) { this.extensionHost = extensionHost; this.stateMachineInformation = stateMachineInformation; }
public bool Install(IExtensionHost host) { var listeners = host.GetExtensionPoint("EventListeners"); listeners.Install(this); return true; }
public bool Install(IExtensionHost host) { Debug.Listeners.Clear(); Debug.Listeners.Add(new AssertFailTraceListener()); Console.WriteLine("Addin: NUnitAssertHandlerAddin installed."); return(true); }
public bool Install(IExtensionHost host) { var testCaseBuilders = host.GetExtensionPoint("SuiteBuilders"); testCaseBuilders.Install(this); return true; }
public bool Install(IExtensionHost host) { Debug.Listeners.Clear(); Debug.Listeners.Add(new AssertFailTraceListener()); Console.WriteLine("Addin: NUnitAssertHandlerAddin installed."); return true; }
public bool Install(IExtensionHost host) { var builders = host.GetExtensionPoint("SuiteBuilders"); if (builders == null) return false; builders.Install(this); return true; }
bool IAddin.Install(IExtensionHost host) { var suiteBuilders = host.GetExtensionPoint("SuiteBuilders"); if (suiteBuilders == null) return false; suiteBuilders.Install(this); return true; }
public bool Install(IExtensionHost host) { // Debugger.Launch(); // var nunitVersion = typeof(IExtensionHost).Assembly.GetName().Version; var eventListeners = host.GetExtensionPoint("EventListeners"); eventListeners.Install(new TeamCityEventListener()); return true; }
public bool Install(IExtensionHost host) { var testDecorators = host.GetExtensionPoint("TestDecorators"); testDecorators.Install(new InjectingTestDecorator()); return(true); }
public bool Install(IExtensionHost host) { IExtensionPoint builders = host.GetExtensionPoint( "SuiteBuilders" ); if ( builders == null ) return false; builders.Install( new SampleSuiteExtensionBuilder() ); return true; }
public bool Install(IExtensionHost host) { IExtensionPoint listeners = host.GetExtensionPoint( "EventListeners" ); if ( listeners == null ) return false; listeners.Install( this ); return true; }
public StateLogic( ITransitionLogic <TState, TEvent> transitionLogic, IExtensionHost <TState, TEvent> extensionHost, IStateMachineInformation <TState, TEvent> stateMachineInformation) { this.extensionHost = extensionHost; this.stateMachineInformation = stateMachineInformation; this.transitionLogic = transitionLogic; }
public RegistrarTest() { this.factory = A.Fake<IFactory>(); this.eventTopicHost = A.Fake<IEventTopicHost>(); this.eventInspector = A.Fake<IEventInspector>(); this.extensionsHost = A.Fake<IExtensionHost>(); this.testee = new Registrar(this.factory, this.eventTopicHost, this.eventInspector, this.extensionsHost); }
public bool Install(IExtensionHost host) { IExtensionPoint decorators = host.GetExtensionPoint("TestDecorators"); if (decorators == null) return false; decorators.Install(this); return true; }
public bool Install(IExtensionHost host) { foreach (var attribute in addInAttributes) { host.GetExtensionPoint("TestCaseProviders").Install(Activator.CreateInstance(providerType.MakeGenericType(attribute))); } return(true); }
public bool Install(IExtensionHost host) { Console.WriteLine("install called"); IExtensionPoint builders = host.GetExtensionPoint("SuiteBuilders"); if (builders == null) return false; builders.Install(this); return true; }
public RegistrarTest() { this.factory = A.Fake <IFactory>(); this.eventTopicHost = A.Fake <IEventTopicHost>(); this.eventInspector = A.Fake <IEventInspector>(); this.extensionsHost = A.Fake <IExtensionHost>(); this.testee = new Registrar(this.factory, this.eventTopicHost, this.eventInspector, this.extensionsHost); }
public bool Install(IExtensionHost host) { IExtensionPoint testCaseBuilders = host.GetExtensionPoint("EventListeners"); if (testCaseBuilders == null) return false; testCaseBuilders.Install(this); //this implments both interfaces return true; }
public bool Install(IExtensionHost host) { System.Diagnostics.Trace.WriteLine( "MaxTimeDecorator: Install called" ); IExtensionPoint decorators = host.GetExtensionPoint( "TestDecorators" ); if ( decorators == null ) return false; decorators.Install( this ); return true; }
/// <summary> /// When called, the add-in installs itself into /// the host, if possible. Because NUnit uses separate /// hosts for the client and test domain environments, /// an add-in may be invited to istall itself more than /// once. The add-in is responsible for checking which /// extension points are supported by the host that is /// passed to it and taking the appropriate action. /// </summary> /// <param name="host">The host in which to install the add-in</param> /// <returns>True if the add-in was installed, otehrwise false</returns> public bool Install(IExtensionHost host) { // Get the extension provider var dataPointProviders = host.GetExtensionPoint("TestCaseProviders"); // Sanity check if (null == dataPointProviders) return false; // Install it dataPointProviders.Install(this); return true; }
public bool Install(IExtensionHost host) { //LOGGER.GetLogger(LOGNAME).LogInfo("Install"); IExtensionPoint listeners = host.GetExtensionPoint("EventListeners"); if (listeners == null) return false; listeners.Install(this); return true; }
public bool Install(IExtensionHost host) { IExtensionPoint extensionPoint = host.GetExtensionPoint("EventListeners"); if (extensionPoint != null) { extensionPoint.Install(this); } return false; }
/// <summary> /// When called, the add-in installs itself into /// the host, if possible. Because NUnit uses separate /// hosts for the client and test domain environments, /// an add-in may be invited to istall itself more than /// once. The add-in is responsible for checking which /// extension points are supported by the host that is /// passed to it and taking the appropriate action. /// </summary> /// <param name="host">The host in which to install the add-in</param> /// <returns>True if the add-in was installed, otehrwise false</returns> public bool Install(IExtensionHost host) { var providers = host.GetExtensionPoint("TestCaseProviders"); if (providers == null) return false; providers.Install(new Builders.AutoDataProvider()); return true; }
public bool Install(IExtensionHost host) { var extensionPoint = host.GetExtensionPoint("TestDecorators"); if (extensionPoint == null) return false; extensionPoint.Install(new NSpecTestDecorator(new DecorateTestSpecification(), new NSpecTestMethodBuilder())); return true; }
public bool Install(IExtensionHost host) { var eventListenersPoint = host.GetExtensionPoint("EventListeners"); if (eventListenersPoint == null) { return false; } eventListenersPoint.Install(this); return true; }
public bool Install(IExtensionHost host) { IExtensionPoint testCaseProviders = host.GetExtensionPoint("TestCaseProviders"); if (testCaseProviders == null) { return false; } testCaseProviders.Install(new TestCaseSourceProvider()); return true; }
public bool Install(IExtensionHost host) { IExtensionPoint extensionPoint = host.GetExtensionPoint("SuiteBuilders"); if (extensionPoint == null) { return(false); } extensionPoint.Install(this); return(true); }
public bool Install(IExtensionHost host) { IExtensionPoint testCaseBuilders = host.GetExtensionPoint("SuiteBuilders"); if (testCaseBuilders == null) { return false; } testCaseBuilders.Install(this); return true; }
public bool Install(IExtensionHost host) { if (ReportPortalAddin.InstalledAddin == null) { new ReportPortalAddin().Install(host); // subscribe on ReportPortalAddin.InstalledAddin events here } return(true); }
public bool Install(IExtensionHost host) { IExtensionPoint testCaseBuilders = host.GetExtensionPoint("TestCaseBuilders"); if (testCaseBuilders == null) { return false; } testCaseBuilders.Install(new HierachicalTestCaseBuilder()); return true; }
public bool Install(IExtensionHost host) { IExtensionPoint listeners = host.GetExtensionPoint("EventListeners"); if (listeners == null) { return(false); } listeners.Install(this); return(true); }
public bool Install(IExtensionHost host) { var suiteBuildersExtensionPoint = host.GetExtensionPoint("SuiteBuilders"); if (suiteBuildersExtensionPoint == null) return false; var reflectionProvider = new ReflectionProvider(); var typeManager = new TypeManager(reflectionProvider, new TestDescriber(new TestDescriptionWriter()), new TestExceptionWriter()); suiteBuildersExtensionPoint.Install(new BDDSuiteBuilder(reflectionProvider, typeManager)); return true; }
/// <summary> /// Install the extension. /// </summary> public bool Install(IExtensionHost host) { // If we're not running under TeamCity, nothing to do here. if (!InTeamcity()) return true; var listeners = host.GetExtensionPoint("EventListeners"); if (listeners == null) return false; listeners.Install(new TeamCityTestReporterListener()); return true; }
public DefaultBootstrapperTest() { this.extensionHost = A.Fake <IExtensionHost <IExtension> >(); this.reporter = A.Fake <IReporter>(); this.strategy = A.Fake <IStrategy <IExtension> >(); this.runExecutor = A.Fake <IExecutor <IExtension> >(); this.shutdownExecutor = A.Fake <IExecutor <IExtension> >(); this.reportingContext = A.Fake <IReportingContext>(); this.extensionResolver = A.Fake <IExtensionResolver <IExtension> >(); this.testee = new DefaultBootstrapper <IExtension>(this.extensionHost, this.reporter); }
public bool Install(IExtensionHost host) { IExtensionPoint builders = host.GetExtensionPoint("SuiteBuilders"); if (builders == null) { return(false); } builders.Install(new SampleSuiteExtensionBuilder()); return(true); }
public bool Install(IExtensionHost host) { if (host == null) throw new ArgumentNullException ("host"); var builders = host.GetExtensionPoint ("TestCaseBuilders"); if (builders == null) return false; builders.Install (this); return true; }
public bool Install(IExtensionHost host) { IExtensionPoint testCaseProviders = host.GetExtensionPoint("TestCaseProviders"); if (testCaseProviders == null) { return(false); } testCaseProviders.Install(new AutoMoqDataProvider()); ReplaceTestCaseProvidersWithWrapper(testCaseProviders); return(true); }
public bool Install(IExtensionHost host) { IExtensionPoint testCaseBuilders = host.GetExtensionPoint("SuiteBuilders"); if (testCaseBuilders == null) { return(false); } testCaseBuilders.Install(this); return(true); }
public bool Install(IExtensionHost host) { if (host == null) throw new ArgumentNullException("host"); IExtensionPoint listeners = host.GetExtensionPoint("EventListeners"); if (listeners == null) return false; listeners.Install(this); return true; }
//some private attributes to hold important data //you must provide the Install method public bool Install(IExtensionHost host) { //I also built my connection string in here IExtensionPoint listeners = host.GetExtensionPoint("EventListeners"); if (listeners == null) { return(false); } listeners.Install(this); return(true); }
public bool Install(IExtensionHost host) { if (host == null) throw new ArgumentNullException("host"); IExtensionPoint parameterProviders = host.GetExtensionPoint("ParameterProviders"); if (parameterProviders == null) return false; parameterProviders.Install(CreateParameterProvider()); return true; }
public bool Install(IExtensionHost host) { IExtensionPoint decorators = host.GetExtensionPoint("TestDecorators"); if (decorators == null) { return(false); } decorators.Install(this); return(true); }