-
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.
- Loading branch information
synapticloop
committed
Feb 4, 2017
1 parent
b3ae7b3
commit e91bccc
Showing
3 changed files
with
50 additions
and
3 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
47 changes: 47 additions & 0 deletions
47
src/test/java/synapticloop/templar/token/StaticTokenTest.java
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,47 @@ | ||
package synapticloop.templar.token; | ||
|
||
/* | ||
* Copyright (c) 2012-2017 synapticloop. | ||
* All rights reserved. | ||
* | ||
* This source code and any derived binaries are covered by the terms and | ||
* conditions of the Licence agreement ("the Licence"). You may not use this | ||
* source code or any derived binaries except in compliance with the Licence. | ||
* A copy of the Licence is available in the file named LICENCE shipped with | ||
* this source code or binaries. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the Licence is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* Licence for the specific language governing permissions and limitations | ||
* under the Licence. | ||
*/ | ||
import static org.junit.Assert.*; | ||
import static org.mockito.MockitoAnnotations.*; | ||
|
||
import java.util.StringTokenizer; | ||
|
||
import org.junit.Before; | ||
import org.junit.Test; | ||
import org.mockito.Mock; | ||
|
||
import synapticloop.templar.Parser; | ||
import synapticloop.templar.exception.ParseException; | ||
import synapticloop.templar.utils.Tokeniser; | ||
|
||
public class StaticTokenTest { | ||
@Mock StringTokenizer mockStringTokenizer; | ||
@Mock Tokeniser mockTokeniser; | ||
|
||
@Before | ||
public void setup() { | ||
initMocks(this); | ||
} | ||
|
||
@Test(expected = ParseException.class) | ||
public void testParse() throws ParseException{ | ||
Parser parser = new Parser("{static ./StaticTokenTest.java}"); | ||
assertEquals("<STATIC@1:2 (./StaticTokenTest.java) />", parser.toString()); | ||
} | ||
|
||
} |