Skip to content

Commit

Permalink
Added Bioclipse SDK generated template for a twitter manager (me hide…
Browse files Browse the repository at this point in the history
…s so that olas does not see it)
  • Loading branch information
egonw committed Aug 17, 2009
1 parent 7fb9537 commit 0819aa8
Show file tree
Hide file tree
Showing 24 changed files with 670 additions and 0 deletions.
7 changes: 7 additions & 0 deletions plugins/net.bioclipse.twitter.tests/.classpath
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/"/>
<classpathentry kind="output" path="bin"/>
</classpath>
23 changes: 23 additions & 0 deletions plugins/net.bioclipse.twitter.tests/.project
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>net.bioclipse.twitter.tests</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
17 changes: 17 additions & 0 deletions plugins/net.bioclipse.twitter.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,17 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: net.bioclipse.twitter Tests
Bundle-SymbolicName: net.bioclipse.twitter.tests;singleton:=true
Bundle-Version: 0.1.0
Bundle-Activator: net.bioclipse.twitter.tests.Activator
Bundle-Vendor: The Bioclipse Team
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.junit4,
net.bioclipse.core,
org.eclipse.core.resources,
net.bioclipse.core.tests,
net.bioclipse.twitter,
net.bioclipse.ui
Bundle-ActivationPolicy: lazy
Export-Package: net.bioclipse.twitter.tests
12 changes: 12 additions & 0 deletions plugins/net.bioclipse.twitter.tests/build.properties
@@ -0,0 +1,12 @@
###############################################################################
#Copyright (c) 2008 The Bioclipse Team and others.
#All rights reserved. This program and the accompanying materials
#are made available under the terms of the Eclipse Public License v1.0
#which accompanies this distribution, and is available at
#http://www.eclipse.org/legal/epl-v10.html
#
###############################################################################
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
@@ -0,0 +1,40 @@
/*******************************************************************************
* Copyright (c) 2009 Egon Willighagen <egonw@users.sf.net>
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contact: http://www.bioclipse.net/
******************************************************************************/
package net.bioclipse.twitter.tests;

import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;

/**
* The activator class controls the plug-in life cycle.
*/
public class Activator extends AbstractUIPlugin {

public static final String PLUGIN_ID = "net.bioclipse.twitter.tests";
private static Activator sharedInstance;

public Activator() {}

public void start(BundleContext context) throws Exception {
super.start(context);
sharedInstance = this;
}

public void stop(BundleContext context) throws Exception {
sharedInstance = null;
super.stop(context);
}

public static Activator getDefault() {
return sharedInstance;
}

}
@@ -0,0 +1,37 @@
/*******************************************************************************
* Copyright (c) 2009 Egon Willighagen <egonw@users.sf.net>
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contact: Bioclipse Project <http://www.bioclipse.net>
******************************************************************************/
package net.bioclipse.twitter.tests.business;

import net.bioclipse.core.tests.AbstractManagerTest;
import net.bioclipse.managers.business.IBioclipseManager;
import net.bioclipse.twitter.business.ITwitterManager;
import net.bioclipse.twitter.business.TwitterManager;

/**
* JUnit tests for checking if the tested Manager is properly tested.
*
* @author egonw
*/
public class APITest extends AbstractManagerTest {

private static TwitterManager manager = new TwitterManager();

@Override
public IBioclipseManager getManager() {
return manager;
}

@Override
public Class<? extends IBioclipseManager> getManagerInterface() {
return ITwitterManager.class;
}

}
@@ -0,0 +1,35 @@
/*******************************************************************************
* Copyright (c) 2009 Egon Willighagen <egonw@users.sf.net>
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contact: http://www.bioclipse.net/
******************************************************************************/
package net.bioclipse.twitter.tests.business;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URI;
import java.net.URL;
import java.util.List;

import net.bioclipse.core.ResourcePathTransformer;
import net.bioclipse.twitter.business.ITwitterManager;

import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.FileLocator;
import org.junit.Assert;
import org.junit.Test;

public abstract class AbstractTwitterManagerPluginTest {

protected static ITwitterManager twitter;

@Test public void testDoSomething() {
// FIXME: twitter.doSomething();
}

}
@@ -0,0 +1,24 @@
/*******************************************************************************
* Copyright (c) 2009 Egon Willighagen <egonw@users.sf.net>
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* www.eclipse.org—epl-v10.html <http://www.eclipse.org/legal/epl-v10.html>
*
* Contact: http://www.bioclipse.net/
******************************************************************************/
package net.bioclipse.twitter.tests.business;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;

@RunWith(Suite.class)
@SuiteClasses({
JavaTwitterManagerPluginTest.class,
JavaScriptTwitterManagerPluginTest.class
})
public class AllTwitterManagerPluginTests {

}
@@ -0,0 +1,24 @@
/*******************************************************************************
* Copyright (c) 2009 Egon Willighagen <egonw@users.sf.net>
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* www.eclipse.org—epl-v10.html <http://www.eclipse.org/legal/epl-v10.html>
*
* Contact: http://www.bioclipse.net/
******************************************************************************/
package net.bioclipse.twitter.tests.business;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;

@RunWith(Suite.class)
@SuiteClasses({
APITest.class,
CoverageTest.class
})
public class AllTwitterManagerTests {

}
@@ -0,0 +1,35 @@
/*******************************************************************************
* Copyright (c) 2008 Egon Willighagen <egonw@users.sf.net>
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contact: Bioclipse Project <http://www.bioclipse.net>
******************************************************************************/
package net.bioclipse.twitter.tests.business;

import net.bioclipse.core.tests.coverage.AbstractCoverageTest;
import net.bioclipse.managers.business.IBioclipseManager;
import net.bioclipse.twitter.business.ITwitterManager;
import net.bioclipse.twitter.business.TwitterManager;

/**
* JUnit tests for checking if the tested Manager is properly tested.
*/
public class CoverageTest extends AbstractCoverageTest {

private static TwitterManager manager = new TwitterManager();

@Override
public IBioclipseManager getManager() {
return manager;
}

@Override
public Class<? extends IBioclipseManager> getManagerInterface() {
return ITwitterManager.class;
}

}
@@ -0,0 +1,24 @@
/*******************************************************************************
* Copyright (c) 2009 Egon Willighagen <egonw@users.sf.net>
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* www.eclipse.org—epl-v10.html <http://www.eclipse.org/legal/epl-v10.html>
*
* Contact: http://www.bioclipse.net/
******************************************************************************/
package net.bioclipse.twitter.tests.business;

import net.bioclipse.twitter.Activator;

import org.junit.BeforeClass;

public class JavaScriptTwitterManagerPluginTest
extends AbstractTwitterManagerPluginTest {

@BeforeClass public static void setup() {
twitter = Activator.getDefault().getJavaScriptTwitterManager();
}

}
@@ -0,0 +1,24 @@
/*******************************************************************************
* Copyright (c) 2009 Egon Willighagen <egonw@users.sf.net>
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* www.eclipse.org—epl-v10.html <http://www.eclipse.org/legal/epl-v10.html>
*
* Contact: http://www.bioclipse.net/
******************************************************************************/
package net.bioclipse.twitter.tests.business;

import net.bioclipse.twitter.Activator;

import org.junit.BeforeClass;

public class JavaTwitterManagerPluginTest
extends AbstractTwitterManagerPluginTest {

@BeforeClass public static void setup() {
twitter = Activator.getDefault().getJavaTwitterManager();
}

}
7 changes: 7 additions & 0 deletions plugins/net.bioclipse.twitter/.classpath
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/"/>
<classpathentry kind="output" path="bin"/>
</classpath>
23 changes: 23 additions & 0 deletions plugins/net.bioclipse.twitter/.project
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>net.bioclipse.twitter</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
20 changes: 20 additions & 0 deletions plugins/net.bioclipse.twitter/META-INF/MANIFEST.MF
@@ -0,0 +1,20 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: net.bioclipse.twitter
Bundle-SymbolicName: net.bioclipse.twitter;singleton:=true
Bundle-Version: 0.1.0
Bundle-Activator: net.bioclipse.twitter.Activator
Bundle-Vendor: The Bioclipse Team
Require-Bundle:
org.eclipse.ui,
org.eclipse.core.runtime,
net.bioclipse.core,
net.bioclipse.scripting,
net.bioclipse.ui,
org.springframework.bundle.spring.aop,
net.sf.cglib,
org.springframework.osgi.aopalliance.osgi
Bundle-ActivationPolicy: lazy
Export-Package: net.bioclipse.twitter,
net.bioclipse.twitter.business
Import-Package: org.apache.log4j

0 comments on commit 0819aa8

Please sign in to comment.