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

import org.junit.Test;

/**
 * Test a case reported by Alibaba
 *
 * @author bratseth
 */
public class AlibabaTestCase extends RuleBaseAbstractTestCase {

    public AlibabaTestCase() {
        super("alibaba.sr");
    }

    @Test
    public void testNumberReplacement() {
        assertSemantics("AND nokia 3100","3100");
    }

    @Test
    public void testRuleFollowingNumber() {
        assertSemantics("lenovo","legend");
    }

    @Test
    public void testCombinedNumberAndRegular1() {
        assertSemantics("AND lenovo nokia 3100","legend 3100");
    }

    @Test
    public void testCombinedNumberAndRegular2() {
        assertSemantics("AND nokia 3100 lenovo","3100 legend");
    }

}