Package edu.stanford.bmir.protege.web.shared.metrics

Source Code of edu.stanford.bmir.protege.web.shared.metrics.GetMetricsResultTestCase

package edu.stanford.bmir.protege.web.shared.metrics;

import com.google.common.collect.ImmutableList;
import org.junit.Test;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
import static org.mockito.Mockito.mock;

/**
* @author Matthew Horridge, Stanford University, Bio-Medical Informatics Research Group, Date: 26/04/2014
*/
public class GetMetricsResultTestCase {

    @Test(expected = NullPointerException.class)
    public void shouldThrowNullPointerExceptionForNullList() {
        new GetMetricsResult(null);
    }

    @SuppressWarnings("unchecked")
    @Test
    public void shouldReturnSuppliedValue() {
        ImmutableList list = mock(ImmutableList.class);
        GetMetricsResult result = new GetMetricsResult(list);
        assertThat(result.getMetricValues(), is(list));
    }
}
TOP

Related Classes of edu.stanford.bmir.protege.web.shared.metrics.GetMetricsResultTestCase

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.