Added .travisci file

Also few tests were fixed
This commit is contained in:
Jan Stárek
2019-10-23 13:45:57 +02:00
parent 2b69b9790d
commit 65b43ad7f0
10 changed files with 132 additions and 13 deletions

View File

@@ -1,4 +1,6 @@
using System.Collections.Generic;
using System.Globalization;
using System.Threading;
using Microsoft.OpenApi.Models;
using NUnit.Framework;
using Models;
@@ -7,6 +9,12 @@ namespace Parser.Tests
{
public class EndpointParserTests
{
[SetUp]
public void SetUp()
{
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
}
readonly OpenApiDocument _document = new OpenApiDocument {Paths = new OpenApiPaths()};
private void AddTwoTestingPaths()
{

View File

@@ -1,4 +1,6 @@
using System;
using System.Globalization;
using System.Threading;
using Microsoft.OpenApi.Any;
using NUnit.Framework;
@@ -6,6 +8,12 @@ namespace Parser.Tests
{
public class OpenApiAnyConvertorTests
{
[SetUp]
public void SetUp()
{
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
}
[Test]
public void ConvertStringPrimitiveShouldReturnCorrectValue()
{
@@ -51,7 +59,7 @@ namespace Parser.Tests
public void ConvertDateTimePrimitiveShouldReturnCorrectValue()
{
var primitiveValue = OpenApiAnyConvertor.GetPrimitiveValue(new OpenApiDateTime(DateTime.UnixEpoch));
Assert.AreEqual("1/1/1970 12:00:00 AM +00:00", primitiveValue);
Assert.AreEqual("01/01/1970 00:00:00 +00:00", primitiveValue);
}
[Test]