Esempio n. 1
0
        public void GetSetService_Success()
        {
            // arrange
            var provider = new MtgServiceProvider();

            // act
            var result = provider.GetSetService();

            // assert
            Assert.NotNull(result);
        }
Esempio n. 2
0
        public void Constructor_JsonSerializerSet()
        {
            // arrange
            _ = new MtgServiceProvider();

            // act
            var result = FlurlHttp.GlobalSettings.JsonSerializer;

            // assert
            Assert.IsType <SystemTextJsonSerializer>(result);
        }
        public async Task AllAsync_NoMock_EqualPageSize()
        {
            const int PAGE_SIZE       = 50;
            var       serviceProvider = new MtgServiceProvider();
            var       service         = serviceProvider.GetCardService();

            var result = await service
                         .Where(x => x.Page, 1)
                         .Where(x => x.PageSize, PAGE_SIZE)
                         .AllAsync();

            Assert.Equal(PAGE_SIZE, result.PagingInfo.PageSize);
        }
        public async Task Where_AddMultiverseIdNoMock_Success()
        {
            const string MULTIPLE_MULTIS = "3|4|5|6";

            var serviceProvider = new MtgServiceProvider();
            var service         = serviceProvider.GetCardService();

            var result = await service
                         .Where(x => x.MultiverseId, MULTIPLE_MULTIS)
                         .AllAsync();

            Assert.True(result.IsSuccess);
            Assert.Equal(4, result.Value.Count);
        }