-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conflicts: .travis.yml
- Loading branch information
Showing
6 changed files
with
53 additions
and
58 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
language: csharp | ||
solution: MTAServiceStatus/MTAServiceStatus.csproj | ||
install: | ||
- sudo apt-get install mono-devel mono-gmcs nunit-console | ||
script: | ||
- xbuild /p:Configuration=Release MTAServiceStatus.sln | ||
- nunit-console Tests/bin/Release/Tests.dll |
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 |
---|---|---|
@@ -1,31 +1,39 @@ | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using MTAServiceStatus.Repositories; | ||
using MTAServiceStatus.Repositories; | ||
using NUnit.Framework; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Tests | ||
{ | ||
[TestClass] | ||
[TestFixture] | ||
public class MTARepositoryTests | ||
{ | ||
[TestMethod] | ||
public async Task GetSubwayStatusAsyncTests() | ||
[Test] | ||
public void GetSubwayStatusAsyncTests() | ||
{ | ||
var repo = new MTARepository(); | ||
var result = await repo.GetStatusAsync(); | ||
|
||
Assert.IsNotNull(result); | ||
Assert.DoesNotThrow(async () => | ||
{ | ||
var result = await repo.GetStatusAsync(); | ||
Assert.AreNotEqual<int>(0, result.BT.Count); | ||
Assert.IsNotNull(result); | ||
Assert.AreNotEqual<int>(0, result.bus.Count); | ||
Assert.IsNotEmpty(result.BT); | ||
Assert.AreNotEqual<int>(0, result.LIRR.Count); | ||
Assert.IsNotEmpty(result.bus); | ||
Assert.AreNotEqual<int>(0, result.MetroNorth.Count); | ||
Assert.IsNotEmpty(result.LIRR); | ||
Assert.AreNotEqual<int>(0, result.subway.Count); | ||
Assert.IsNotEmpty(result.MetroNorth); | ||
Assert.AreEqual<int>(0, result.responsecode); | ||
Assert.IsNotEmpty(result.subway); | ||
Assert.AreEqual(0, result.responsecode); | ||
}); | ||
} | ||
} | ||
} |
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
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,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="NUnit" version="2.6.3" targetFramework="net45" /> | ||
</packages> |