コード例 #1
0
        public async Task Test_SyncRecommendationsPostResponseGroupObjectJsonReader_ReadObject_From_Json_String_Empty()
        {
            var traktJsonReader = new SyncRecommendationsPostResponseGroupObjectJsonReader();
            ITraktSyncRecommendationsPostResponseGroup traktSyncRecommendationsPostResponseGroup = await traktJsonReader.ReadObjectAsync(string.Empty);

            traktSyncRecommendationsPostResponseGroup.Should().BeNull();
        }
コード例 #2
0
        public async Task Test_SyncRecommendationsPostResponseGroupObjectJsonReader_ReadObject_From_Json_String_Complete()
        {
            var traktJsonReader = new SyncRecommendationsPostResponseGroupObjectJsonReader();
            ITraktSyncRecommendationsPostResponseGroup traktSyncRecommendationsPostResponseGroup = await traktJsonReader.ReadObjectAsync(JSON_COMPLETE);

            traktSyncRecommendationsPostResponseGroup.Should().NotBeNull();
            traktSyncRecommendationsPostResponseGroup.Movies.Should().Be(1);
            traktSyncRecommendationsPostResponseGroup.Shows.Should().Be(2);
        }
        public async Task Test_TraktSyncRecommendationsPostResponseGroup_From_Json()
        {
            var jsonReader = new SyncRecommendationsPostResponseGroupObjectJsonReader();
            var syncRecommendationsPostResponseGroup = await jsonReader.ReadObjectAsync(JSON) as TraktSyncRecommendationsPostResponseGroup;

            syncRecommendationsPostResponseGroup.Should().NotBeNull();

            syncRecommendationsPostResponseGroup.Movies.Should().Be(1);
            syncRecommendationsPostResponseGroup.Shows.Should().Be(2);
        }
コード例 #4
0
 public async Task Test_SyncRecommendationsPostResponseGroupObjectJsonReader_ReadObject_From_Stream_Null()
 {
     var traktJsonReader = new SyncRecommendationsPostResponseGroupObjectJsonReader();
     Func <Task <ITraktSyncRecommendationsPostResponseGroup> > traktSyncRecommendationsPostResponseGroup = () => traktJsonReader.ReadObjectAsync(default(Stream));
     await traktSyncRecommendationsPostResponseGroup.Should().ThrowAsync <ArgumentNullException>();
 }