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
e3ffcec
commit 822d386
Showing
3 changed files
with
91 additions
and
1 deletion.
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
52 changes: 52 additions & 0 deletions
52
src/test/java/com/pablissimo/sonar/model/TsLintIssueTest.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,52 @@ | ||
package com.pablissimo.sonar.model; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
import org.junit.After; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
public class TsLintIssueTest { | ||
TsLintIssue model; | ||
|
||
@Before | ||
public void setUp() throws Exception { | ||
this.model = new TsLintIssue(); | ||
} | ||
|
||
@After | ||
public void tearDown() throws Exception { | ||
} | ||
|
||
@Test | ||
public void getSetFilename() { | ||
this.model.setFileName("the file"); | ||
assertEquals("the file", this.model.getFileName()); | ||
} | ||
|
||
@Test | ||
public void getSetStartPosition() { | ||
TsLintPosition startPosition = new TsLintPosition(); | ||
this.model.setStartPosition(startPosition); | ||
assertEquals(startPosition, this.model.getStartPosition()); | ||
} | ||
|
||
@Test | ||
public void getSetEndPosition() { | ||
TsLintPosition endPosition = new TsLintPosition(); | ||
this.model.setEndPosition(endPosition); | ||
assertEquals(endPosition, this.model.getEndPosition()); | ||
} | ||
|
||
@Test | ||
public void getSetFailure() { | ||
this.model.setFailure("the failure"); | ||
assertEquals("the failure", this.model.getFailure()); | ||
} | ||
|
||
@Test | ||
public void getSetRuleName() { | ||
this.model.setRuleName("the rule"); | ||
assertEquals("the rule", this.model.getRuleName()); | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
src/test/java/com/pablissimo/sonar/model/TsLintPositionTest.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,38 @@ | ||
package com.pablissimo.sonar.model; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
import org.junit.After; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
public class TsLintPositionTest { | ||
TsLintPosition model; | ||
|
||
@Before | ||
public void setUp() throws Exception { | ||
this.model = new TsLintPosition(); | ||
} | ||
|
||
@After | ||
public void tearDown() throws Exception { | ||
} | ||
|
||
@Test | ||
public void getSetPosition() { | ||
this.model.setPosition(123); | ||
assertEquals(123, this.model.getPosition()); | ||
} | ||
|
||
@Test | ||
public void getSetLine() { | ||
this.model.setLine(234); | ||
assertEquals(234, this.model.getLine()); | ||
} | ||
|
||
@Test | ||
public void getSetCharacter() { | ||
this.model.setCharacter(345); | ||
assertEquals(345, this.model.getCharacter()); | ||
} | ||
} |