summaryrefslogtreecommitdiffstats
path: root/jdisc_core/src/test/java/com/yahoo/jdisc/service/ContainerNotReadyTestCase.java
blob: 423e6e4cc91ab6f933df7a053328ad22f6146335 (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
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jdisc.service;

import com.yahoo.jdisc.test.TestDriver;
import org.junit.Test;

import java.net.URI;

import static org.junit.Assert.fail;


/**
 * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a>
 */
public class ContainerNotReadyTestCase {

    @Test
    public void requireThatExceptionIsThrown() throws BindingSetNotFoundException {
        TestDriver driver = TestDriver.newSimpleApplicationInstanceWithoutOsgi();
        try {
            driver.newReference(URI.create("http://host"));
            fail();
        } catch (ContainerNotReadyException e) {

        }
        driver.close();
    }
}