Esempio n. 1
0
        public async Task GetBoard_ValidId_ReturnsRestClientResult()
        {
            var apiResult = new ApiBoard();
            var expected  = new Board();

            this.GetDependency <ITrelloRestClient>().Get <ApiBoard>($"boards/{BoardId}").Returns(apiResult);
            this.GetDependency <IMapper>().Map <Board>(apiResult).Returns(expected);

            var actual = await this.Target.GetBoard(BoardId);

            Assert.AreEqual(expected, actual);
        }
Esempio n. 2
0
        public async Task GetAll_ValidRequest_ReturnsRestClientResult()
        {
            var apiResult = new ApiBoard[0];
            var expected  = new Board[0];

            this.GetDependency <ITrelloRestClient>().Get <ApiBoard[]>("members/me/boards").Returns(apiResult);
            this.GetDependency <IMapper>().Map <Board[]>(apiResult).Returns(expected);

            var actual = await this.Target.GetAll();

            Assert.AreEqual(expected, actual);
        }