summaryrefslogtreecommitdiffstats
path: root/jdisc_core/src/test/java/com/yahoo/jdisc/service/AbstractClientProviderTestCase.java
blob: 93e96c29e6fbffd56e1bc7086168552094beceaf (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
// 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.Request;
import com.yahoo.jdisc.handler.ContentChannel;
import com.yahoo.jdisc.handler.ResponseHandler;
import org.junit.Test;

import static org.junit.Assert.assertTrue;


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

    @Test
    public void requireThatAbstractClassIsAClientProvider() {
        assertTrue(ClientProvider.class.isInstance(new MyClientProvider()));
    }

    @Test
    public void requireThatStartDoesNotThrowAnException() {
        new MyClientProvider().start();
    }

    private static class MyClientProvider extends AbstractClientProvider {

        @Override
        public ContentChannel handleRequest(Request request, ResponseHandler handler) {
            return null;
        }
    }
}