Add a unit test for the datetime serialization

This commit is contained in:
Jeff Kwan
2015-12-10 20:28:44 -05:00
parent 23fa84bff8
commit 74d80289dd
2 changed files with 9 additions and 1 deletions

View File

@@ -19,6 +19,11 @@ namespace SwaggerClient.TestApiClient
// test array of int
List<int> numList = new List<int>(new int[] {1, 37});
Assert.AreEqual("1,37", api.ParameterToString (numList));
// test datetime
DateTime date = DateTime.Parse("2008-04-10T13:30:00.0000000Z", null, System.Globalization.DateTimeStyles.RoundtripKind);
Assert.AreEqual("2008-04-10T13:30:00.0000000Z", api.ParameterToString (date));
}
}
}