aboutsummaryrefslogtreecommitdiffstats
path: root/container-disc/src/test/java/com/yahoo/container/jdisc/DisableOsgiFrameworkTest.java
blob: 46acd5ce2b851e1e0783735f5e899b1210d29c05 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.container.jdisc;

import org.junit.Test;
import org.osgi.framework.BundleException;

/**
 * @author Ulf Lilleengen
 */
public class DisableOsgiFrameworkTest {

    @Test(expected = RuntimeException.class)
    public void require_that_installBundle_throws_exception() throws BundleException {
        new DisableOsgiFramework().installBundle("foo");
    }

    @Test(expected = RuntimeException.class)
    public void require_that_startBundles_throws_exception() throws BundleException {
        new DisableOsgiFramework().startBundles(null, true);
    }

    @Test(expected = RuntimeException.class)
    public void require_that_bundleContext_throws_exception() throws BundleException {
        new DisableOsgiFramework().bundleContext();
    }

    @Test(expected = RuntimeException.class)
    public void require_that_refreshPackages_throws_exception() {
        new DisableOsgiFramework().refreshPackages();
    }

    @Test(expected = RuntimeException.class)
    public void require_that_bundles_throws_exception() {
        new DisableOsgiFramework().bundles();
    }

    @Test(expected = RuntimeException.class)
    public void require_that_start_throws_exception() throws BundleException {
        new DisableOsgiFramework().start();
    }

    @Test(expected = RuntimeException.class)
    public void require_that_stop_throws_exception() throws BundleException {
        new DisableOsgiFramework().stop();
    }

}