add ssl 1.2
[CPE_learningsite] / CPE / CPE.App / CPE.App.Api.Test / StatementControllerTest.cs
1 ´╗┐using Microsoft.VisualStudio.TestTools.UnitTesting;
2 using System;
3 using CPE.App.Api.Helpers;
4 using CPE.App.Api.Models;
5 using Newtonsoft.Json;
6 using Shouldly;
7
8 namespace CPE.App.Api.Test
9 {
10     [TestClass]
11     public class StatementControllerTest
12     {
13         [TestMethod]
14         public void HandleStatementTest()
15         {
16             var tincanObject =
17                 "{\"id\":null,\"actor\":{\"name\":\"Patricia Berry\",\"mbox\":\"mailto:pberry@cpeincmail.com\"},\"verb\":{\"id\":\"http://adlnet.gov/expapi/verbs/passed\"},\"result\":{\"score\":{\"scaled\":1,\"raw\":0,\"min\":0,\"max\":0},\"success\":true,\"completion\":false},\"timestamp\":\"08/28/2021 16:38:19\",\"version\":null,\"object\":{\"id\":\"https://learning.elucidat.com/course/611ecf21dbbae-611fca09461e2\",\"definition\":{\"name\":{\"en-US\":\"Ethics for Hawaii CPAs  \"}}}}";
18             TinCanStatementModel statement = JsonConvert.DeserializeObject<TinCanStatementModel>(tincanObject);
19             var done = TinCanHelper.HandleStatement(statement);
20             done.ShouldBe(true);
21         }
22     }
23 }