-
Notifications
You must be signed in to change notification settings - Fork 0
/
AbstractStatsEngineTest.java
113 lines (95 loc) · 3.98 KB
/
AbstractStatsEngineTest.java
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
/*
* Copyright (c) 2010-2011 Manuel Polo (mrmx.org)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mongoste.core;
import org.mongoste.model.StatAction;
import org.mongoste.model.StatCounter;
import org.mongoste.model.StatEvent;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import org.mongoste.query.Query;
/**
*
* @author mrmx
*/
public class AbstractStatsEngineTest {
AbstractStatsEngine instance;
@Before
public void setUp() {
instance = new AbstractStatsEngineImpl();
}
/**
* Test of createDotPath method, of class AbstractStatsEngine.
*/
@Test
public void testCreateDotPath() {
System.out.println("createDotPath");
assertEquals("a", instance.createDotPath("a"));
assertEquals("a.b", instance.createDotPath("a","b"));
assertEquals("a.b.c", instance.createDotPath("a","b","c"));
assertEquals("a.c", instance.createDotPath("a",null,"c"));
assertEquals("a.c", instance.createDotPath("a","","c"));
assertEquals("1.2", instance.createDotPath(1,2));
assertEquals("a.c", instance.createDotPath("a.","c"));
assertEquals("a.c", instance.createDotPath("a..","c."));
assertEquals("a.c", instance.createDotPath("a",".","c"));
}
public class AbstractStatsEngineImpl extends AbstractStatsEngine {
@Override
public void init(Properties properties) throws StatsEngineException {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public List<TimeScope> getSupportedTimeScopePrecision() {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void handleEvent(StatEvent event) throws StatsEngineException {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void buildStats(TimeScope scope,TimeScope groupByScope) throws StatsEngineException {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public List<StatAction> getActions(Query query) throws StatsEngineException {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public List<StatCounter> getTopTargets(Query query) throws StatsEngineException {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Map<String, Long> getMultiTargetActionCount(Query query) throws StatsEngineException {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Map<String, Long> getOwnerActionCount(Query query) throws StatsEngineException {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void setTargetOwners(String clientId, String targetType, List<String> targets, List<String> owners) throws StatsEngineException {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void setTargetTags(String clientId, String targetType, String target, List<String> tags) throws StatsEngineException {
throw new UnsupportedOperationException("Not supported yet.");
}
}
}