Package org.bladerunnerjs.testing.utility

Examples of org.bladerunnerjs.testing.utility.MockPluginLocator


    tempDir = FileUtility.createTemporaryDirectory( this.getClass() );
    watchFile = new File(tempDir, "watch-file");
    sdkDir = new File(tempDir, "sdk");
   
    sdkDir.mkdir();
    brjs = createModel(sdkDir, new MockPluginLocator(), new OptimisticFileModificationService(), new TestLoggerFactory(new LogMessageStore()), new MockAppVersionGenerator());
    watchFileInfo = brjs.getFileInfo(watchFile);
  }
View Full Code Here


  Aspect aspect;
 
  @Before
  public void setup() throws Exception
  {
    MockPluginLocator mockPluginLocator = new MockPluginLocator();
   
    /* valid tags */
    mockPluginLocator.tagHandlers.add( new VirtualProxyTagHandlerPlugin( new MockTagHandler("tag", "replaced tag!", "") ) );
    mockPluginLocator.tagHandlers.add( new VirtualProxyTagHandlerPlugin( new MockTagHandler("amIDevOrProd", "dev", "prod") ) );
    mockPluginLocator.tagHandlers.add( new VirtualProxyTagHandlerPlugin( new MockTagHandler("a.tag", "replaced tag!", "") ) );
View Full Code Here

public class TestModelAccessor
{

  protected BRJS createModel(File brjsDir, PluginLocator pluginLocator, FileModificationService fileModificationService, LoggerFactory loggerFactory, AppVersionGenerator appVersionGenerator) throws InvalidSdkDirectoryException
  {
    pluginLocator = (pluginLocator != null) ? pluginLocator : new MockPluginLocator();
    fileModificationService = (fileModificationService != null) ? fileModificationService : new ReadWriteCompatiblePessimisticFileModificationService();
    loggerFactory = (loggerFactory != null) ? loggerFactory : new StubLoggerFactory();
    appVersionGenerator = (appVersionGenerator != null) ? appVersionGenerator : new MockAppVersionGenerator();   
   
    BRJS brjs = new BRJS(brjsDir, pluginLocator, loggerFactory, new TestTimeAccessor(), appVersionGenerator);
View Full Code Here

  }
 
  private static BRJS createTemporaryBRJSModel() throws InvalidSdkDirectoryException, IOException {
    File tempSdkDir = FileUtility.createTemporaryDirectory(NodeImporter.class);
    new File(tempSdkDir, "sdk").mkdir();
    MockPluginLocator pluginLocator = new MockPluginLocator();
    pluginLocator.assetLocationPlugins.addAll(PluginLoader.createPluginsOfType(Mockito.mock(BRJS.class), AssetLocationPlugin.class, VirtualProxyAssetLocationPlugin.class));
    pluginLocator.assetPlugins.addAll(PluginLoader.createPluginsOfType(Mockito.mock(BRJS.class), AssetPlugin.class, VirtualProxyAssetPlugin.class));
   
    BRJS brjs = new BRJS(tempSdkDir, pluginLocator, new StubLoggerFactory(), new RealTimeAccessor(), new MockAppVersionGenerator());
   
View Full Code Here

    appServerPort = ServerUtility.getTestPort();
    logging = new LogMessageStore();
    exceptions = new ArrayList<>();
    observer = mock(EventObserver.class);
    testSdkDirectory = createTestSdkDirectory();
    pluginLocator = new MockPluginLocator();
    webappTester = new WebappTester(testSdkDirectory);
    appVersionGenerator = new MockAppVersionGenerator();
  }
View Full Code Here

TOP

Related Classes of org.bladerunnerjs.testing.utility.MockPluginLocator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.