aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/test/java/com/yahoo/prelude/templates/test/HitContextTestCase.java
blob: 6ff8c2f9d6cca478e574558607a6d7bcb7baef64 (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
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.prelude.templates.test;

import static org.junit.Assert.assertEquals;

import java.lang.reflect.Method;
import java.util.List;

import org.junit.Test;

import com.yahoo.prelude.templates.HitContext;
import com.yahoo.protect.ClassValidator;

/**
 * Check the entire Context class is correctly masked.
 *
 * @author <a href="mailto:steinar@yahoo-inc.com">Steinar Knutsen</a>
 */
public class HitContextTestCase {

    @Test
    public void checkMethods() {
        List<Method> unmasked = ClassValidator.unmaskedMethodsFromSuperclass(HitContext.class);
        assertEquals("Unmasked methods from superclass: " + unmasked, 0, unmasked.size());
    }
}