private void TestSerializationUsingCulture(CultureInfo culture)
{
var testModel = new TestModel();
var currentDateTime = DateTime.Now;
testModel.DateTimeProperty = currentDateTime;
var configuration = new SerializationConfiguration
{
Culture = culture
};
var json = testModel.ToJson(configuration);
Assert.IsTrue(json.Contains(currentDateTime.ToString(culture)));
}
}