passing canvas models tests

This commit is contained in:
2023-01-04 21:51:23 -07:00
parent 8fec96ce5c
commit ed897bc96e
42 changed files with 30 additions and 48 deletions

View File

@@ -0,0 +1,29 @@
using CanvasModel.EnrollmentTerms;
public class DeserializationTests
{
[Test]
public void TestTerm()
{
var canvasContentResponse = @"{
""enrollment_terms"": [
{
""id"": 1,
""name"": ""one"",
""start_at"": ""2022-01-01T00:00:00Z"",
""end_at"": ""2022-02-01T00:00:00Z"",
""created_at"": ""2011-04-26T23:34:35Z"",
""workflow_state"": ""active"",
""grading_period_group_id"": null
}
]
}";
var result = JsonSerializer.Deserialize<RedundantEnrollmentTermsResponse>(canvasContentResponse);
result.Should().NotBeNull();
result?.EnrollmentTerms?.First().Id.Should().Be(1);
}
}