示例#1
0
        public void TestFavouriteCalls()
        {
            Album albumImpl = new Album()
            {
                Id = kAlbumId,
            };

            albumImpl.Deserialize(client.Object);

            IAlbum album = albumImpl;

            client.Setup(c => c.User)
            .Returns(() => new Mock <IUser>().Object);


            album.AddAlbumToFavorite();
            album.RemoveAlbumFromFavorite();


            client.Verify(c => c.User, Times.Exactly(2));
        }
示例#2
0
        public async Task AddAlreadyAddedAlbumToFavourites()
        {
            bool response = await _album.AddAlbumToFavorite();

            Assert.IsTrue(response);
        }