Skip to content
This repository has been archived by the owner on Jul 8, 2019. It is now read-only.

Commit

Permalink
Testing TypeScriptLanguage
Browse files Browse the repository at this point in the history
  • Loading branch information
Pablissimo committed Jan 24, 2015
1 parent d706ea0 commit 5a40e99
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/test/java/com/pablissimo/sonar/TypeScriptLanguageTest.java
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]);
}
}

0 comments on commit 5a40e99

Please sign in to comment.