public async Task Test_UserCustomListsReorderPostObjectJsonWriter_WriteObject_StringWriter_Exceptions() { var traktJsonWriter = new UserCustomListsReorderPostObjectJsonWriter(); ITraktUserCustomListsReorderPost traktUserCustomListsReorderPost = new TraktUserCustomListsReorderPost(); Func <Task <string> > action = () => traktJsonWriter.WriteObjectAsync(default(StringWriter), traktUserCustomListsReorderPost); await action.Should().ThrowAsync <ArgumentNullException>(); }
public void Test_UserCustomListsReorderPostObjectJsonWriter_WriteObject_JsonWriter_Exceptions() { var traktJsonWriter = new UserCustomListsReorderPostObjectJsonWriter(); ITraktUserCustomListsReorderPost traktUserCustomListsReorderPost = new TraktUserCustomListsReorderPost(); Func <Task> action = () => traktJsonWriter.WriteObjectAsync(default(JsonTextWriter), traktUserCustomListsReorderPost); action.Should().Throw <ArgumentNullException>(); }
public async Task Test_UserCustomListsReorderPostObjectJsonWriter_WriteObject_StringWriter_Complete() { ITraktUserCustomListsReorderPost traktUserCustomListsReorderPost = new TraktUserCustomListsReorderPost { Rank = new List <uint> { 823, 224, 88768, 356456, 245, 2, 890 } }; using (var stringWriter = new StringWriter()) { var traktJsonWriter = new UserCustomListsReorderPostObjectJsonWriter(); string json = await traktJsonWriter.WriteObjectAsync(stringWriter, traktUserCustomListsReorderPost); json.Should().Be(@"{""rank"":[823,224,88768,356456,245,2,890]}"); } }
public void Test_UserCustomListsReorderPostObjectJsonWriter_WriteObject_Object_Exceptions() { var traktJsonWriter = new UserCustomListsReorderPostObjectJsonWriter(); Func <Task <string> > action = () => traktJsonWriter.WriteObjectAsync(default);