Beispiel #1
0
        public async Task GetFollowerIds_ReturnsFromUserQueryExecutor()
        {
            // Arrange
            var controller = CreateUserController();
            var parameters = new GetFollowerIdsParameters("username");

            var iterator           = controller.GetFollowerIdsIterator(parameters, A.Fake <ITwitterRequest>());
            var iteratorTestRunner = new TwitterIdsIteratorTestRunner(iterator);

            iteratorTestRunner.Arrange(A.CallTo(() => _fakeUserQueryExecutor.GetFollowerIds(A <IGetFollowerIdsParameters> .Ignored, A <ITwitterRequest> .Ignored)));
            await iteratorTestRunner.Act();

            await iteratorTestRunner.Assert();
        }
Beispiel #2
0
        public async Task GetMutedUserIds_ReturnsAllPages()
        {
            // arrange
            var accountController = CreateUserController();
            var parameters        = new GetMutedUserIdsParameters();

            var iterator   = accountController.GetMutedUserIdsIterator(parameters, A.Fake <ITwitterRequest>());
            var testRunner = new TwitterIdsIteratorTestRunner(iterator);

            testRunner.Arrange(A.CallTo(() => _fakeUserQueryExecutor.GetMutedUserIds(It.IsAny <IGetMutedUserIdsParameters>(), It.IsAny <ITwitterRequest>())));

            // act
            await testRunner.Act();

            // assert
            await testRunner.Assert();
        }