1 package com.atlassian.plugin;
2
3 import junit.framework.TestCase;
4
5 import java.io.File;
6 import java.io.IOException;
7
8 import com.atlassian.plugin.test.PluginJarBuilder;
9
10 public class TestJarPluginArtifact extends TestCase
11 {
12 public void testGetResourceAsStream() throws IOException
13 {
14 File plugin = new PluginJarBuilder()
15 .addResource("foo", "bar")
16 .build();
17 JarPluginArtifact artifact = new JarPluginArtifact(plugin);
18
19 assertNotNull(artifact.getResourceAsStream("foo"));
20 assertNull(artifact.getResourceAsStream("bar"));
21 }
22 }