-
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.
Merge pull request #4 from cheesemacfly/netstandard
Netstandard
- Loading branch information
Showing
25 changed files
with
171 additions
and
405 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 |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
nuget.exe | ||
|
||
# User-specific files | ||
.vs/ | ||
*.suo | ||
*.user | ||
*.userosscache | ||
|
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,8 +1,10 @@ | ||
language: csharp | ||
solution: MTAServiceStatus.sln | ||
before_install: | ||
- sudo apt-get install nunit-console | ||
before_script: | ||
- nuget restore MTAServiceStatus.sln | ||
after_script: | ||
- nunit-console Tests/bin/Release/Tests.dll | ||
mono: none | ||
dotnet: 2.0.0 | ||
|
||
install: | ||
- dotnet restore | ||
|
||
script: | ||
- dotnet build | ||
- dotnet test MTAServiceStatus.Tests/MTAServiceStatus.Tests.csproj |
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,63 @@ | ||
using System.Threading.Tasks; | ||
using Xunit; | ||
|
||
namespace MTAServiceStatus.Tests | ||
{ | ||
public class IntegrationTests | ||
{ | ||
|
||
[Fact(DisplayName = "Get Lines")] | ||
public async Task GetLinesAsyncTests() | ||
{ | ||
var status = new MTASubwayStatus(); | ||
|
||
var lines = await status.GetLinesAsync(); | ||
|
||
Assert.NotNull(lines); | ||
|
||
Assert.NotEmpty(lines); | ||
} | ||
|
||
[Fact(DisplayName = "Get Raw Service")] | ||
public async Task GetRawServiceAsyncTests() | ||
{ | ||
var repo = new MTARepository(); | ||
|
||
var result = await repo.GetRawServiceAsync(); | ||
|
||
Assert.NotNull(result); | ||
|
||
Assert.NotEmpty(result.BT); | ||
|
||
Assert.NotEmpty(result.Bus); | ||
|
||
Assert.NotEmpty(result.LIRR); | ||
|
||
Assert.NotEmpty(result.MetroNorth); | ||
|
||
Assert.NotEmpty(result.Subway); | ||
|
||
Assert.Equal(0, result.ResponseCode); | ||
} | ||
|
||
[Fact(DisplayName = "Get Service")] | ||
public async Task GetServiceAsyncTests() | ||
{ | ||
var repo = new MTARepository(); | ||
|
||
var result = await repo.GetServiceAsync(); | ||
|
||
Assert.NotNull(result); | ||
|
||
Assert.NotEmpty(result.BT); | ||
|
||
Assert.NotEmpty(result.Bus); | ||
|
||
Assert.NotEmpty(result.LIRR); | ||
|
||
Assert.NotEmpty(result.MetroNorth); | ||
|
||
Assert.NotEmpty(result.Subway); | ||
} | ||
} | ||
} |
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,20 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netcoreapp2.0</TargetFramework> | ||
|
||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" /> | ||
<PackageReference Include="xunit" Version="2.3.1" /> | ||
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" /> | ||
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\MTAServiceStatus\MTAServiceStatus.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
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,28 +1,36 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 2013 | ||
VisualStudioVersion = 12.0.31101.0 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.27130.2010 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MTAServiceStatus", "MTAServiceStatus\MTAServiceStatus.csproj", "{8CF4C896-D955-4D6E-A796-BCE9E54BE849}" | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MTAServiceStatus", "MTAServiceStatus\MTAServiceStatus.csproj", "{197A8518-9891-409A-BD2B-A73D9B5923B6}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{698E932F-9B11-4DD1-A9CA-85A9E63204FF}" | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{37A27582-D7B8-4EFB-9210-CA712A45D975}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MTAServiceStatus.Tests", "MTAServiceStatus.Tests\MTAServiceStatus.Tests.csproj", "{5535941F-CD40-4926-B565-309810862D76}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{8CF4C896-D955-4D6E-A796-BCE9E54BE849}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{8CF4C896-D955-4D6E-A796-BCE9E54BE849}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{8CF4C896-D955-4D6E-A796-BCE9E54BE849}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{8CF4C896-D955-4D6E-A796-BCE9E54BE849}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{698E932F-9B11-4DD1-A9CA-85A9E63204FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{698E932F-9B11-4DD1-A9CA-85A9E63204FF}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{698E932F-9B11-4DD1-A9CA-85A9E63204FF}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{698E932F-9B11-4DD1-A9CA-85A9E63204FF}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{197A8518-9891-409A-BD2B-A73D9B5923B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{197A8518-9891-409A-BD2B-A73D9B5923B6}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{197A8518-9891-409A-BD2B-A73D9B5923B6}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{197A8518-9891-409A-BD2B-A73D9B5923B6}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{5535941F-CD40-4926-B565-309810862D76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{5535941F-CD40-4926-B565-309810862D76}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{5535941F-CD40-4926-B565-309810862D76}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{5535941F-CD40-4926-B565-309810862D76}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(NestedProjects) = preSolution | ||
{5535941F-CD40-4926-B565-309810862D76} = {37A27582-D7B8-4EFB-9210-CA712A45D975} | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {91353209-D81B-4346-AE8E-C510F9029C7A} | ||
EndGlobalSection | ||
EndGlobal |
This file was deleted.
Oops, something went wrong.
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,77 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{8CF4C896-D955-4D6E-A796-BCE9E54BE849}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>MTAServiceStatus</RootNamespace> | ||
<AssemblyName>MTAServiceStatus</AssemblyName> | ||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<Authors>Cheesemacfly</Authors> | ||
<Product>MTAServiceStatus</Product> | ||
<AssemblyVersion>0.0.0.0</AssemblyVersion> | ||
<Description>Get the latest New York City MTA service status</Description> | ||
<PackageLicenseUrl>https://github.com/cheesemacfly/MTAServiceStatus/blob/master/LICENSE</PackageLicenseUrl> | ||
<PackageProjectUrl>https://github.com/cheesemacfly/MTAServiceStatus</PackageProjectUrl> | ||
<Version>0.0.0.0</Version> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="AutoMapper"> | ||
<HintPath>..\packages\AutoMapper.3.3.0\lib\net40\AutoMapper.dll</HintPath> | ||
</Reference> | ||
<Reference Include="AutoMapper.Net4"> | ||
<HintPath>..\packages\AutoMapper.3.3.0\lib\net40\AutoMapper.Net4.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Net.Http" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Configs\AutoMapperConfig.cs" /> | ||
<Compile Include="Extensions\XmlSerializerExtensions.cs" /> | ||
<Compile Include="Models\Api\Line.cs" /> | ||
<Compile Include="Models\Api\RawLine.cs" /> | ||
<Compile Include="Models\Api\RawService.cs" /> | ||
<Compile Include="Models\Api\Service.cs" /> | ||
<Compile Include="Models\ServiceStatus.cs" /> | ||
<Compile Include="Models\SubwayLine.cs" /> | ||
<Compile Include="MTASubwayStatus.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="Repositories\MTARepository.cs" /> | ||
<Compile Include="Resolvers\LineDateTimeResolver.cs" /> | ||
<Compile Include="Resolvers\ServiceStatusResolver.cs" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<None Include="MTAServiceStatus.nuspec" /> | ||
<None Include="packages.config" /> | ||
<PackageReference Include="AutoMapper" Version="6.2.2" /> | ||
</ItemGroup> | ||
<ItemGroup /> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<Import Project="..\packages\AutoMapper.3.3.0\tools\AutoMapper.targets" Condition="Exists('..\packages\AutoMapper.3.3.0\tools\AutoMapper.targets')" /> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> | ||
|
||
</Project> |
This file was deleted.
Oops, something went wrong.
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,6 +1,6 @@ | ||
using System; | ||
|
||
namespace MTAServiceStatus.Models.Api | ||
namespace MTAServiceStatus.Models | ||
{ | ||
public class Line | ||
{ | ||
|
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
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
{ | ||
public enum ServiceStatus | ||
{ | ||
UNKNOWN, | ||
NONE, | ||
GOOD_SERVICE, | ||
PLANNED_WORK, | ||
SERVICE_CHANGE, | ||
|
Oops, something went wrong.