-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue 65: Add internal requests stats count
- Loading branch information
Showing
4 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package edu.tamu.app.model; | ||
|
||
import java.io.Serializable; | ||
|
||
public class InternalStats implements Serializable { | ||
|
||
private static final long serialVersionUID = -1622544796949909087L; | ||
|
||
private final long internalCount; | ||
|
||
public InternalStats() { | ||
super(); | ||
internalCount = 0; | ||
} | ||
|
||
public InternalStats(long internalCount) { | ||
super(); | ||
this.internalCount = internalCount; | ||
} | ||
|
||
public long getInternalCount() { | ||
return internalCount; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package edu.tamu.app.model; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
import org.springframework.test.context.junit4.SpringRunner; | ||
|
||
@RunWith(SpringRunner.class) | ||
public class InternalStatsTest { | ||
|
||
@Test | ||
public void testNewInternalStats() { | ||
InternalStats internalStats = new InternalStats(3); | ||
assertEquals(3, internalStats.getInternalCount()); | ||
} | ||
|
||
} |