This repository has been archived by the owner on Jul 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 106
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
1 parent
d706ea0
commit 5a40e99
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
src/test/java/com/pablissimo/sonar/TypeScriptLanguageTest.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,34 @@ | ||
package com.pablissimo.sonar; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
import org.junit.After; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
public class TypeScriptLanguageTest { | ||
TypeScriptLanguage language; | ||
|
||
@Before | ||
public void setUp() throws Exception { | ||
this.language = new TypeScriptLanguage(); | ||
} | ||
|
||
@After | ||
public void tearDown() throws Exception { | ||
} | ||
|
||
@Test | ||
public void identifiesCorrectly() { | ||
assertEquals("TypeScript", this.language.getName()); | ||
assertEquals("ts", this.language.getKey()); | ||
} | ||
|
||
@Test | ||
public void definesCorrectExtension() { | ||
String[] suffices = this.language.getFileSuffixes(); | ||
|
||
assertEquals(1, suffices.length); | ||
assertEquals("ts", suffices[0]); | ||
} | ||
} |