public void TestRate() { Album albumImpl = new Album() { Id = kAlbumId, }; albumImpl.Deserialize(client.Object); IAlbum album = albumImpl; client.Setup(c => c.Post(It.IsAny <string>(), It.IsAny <IList <IRequestParameter> >(), It.IsAny <DeezerPermissions>())); Assert.Throws <ArgumentOutOfRangeException>(() => album.Rate(-100)); Assert.Throws <ArgumentOutOfRangeException>(() => album.Rate(0)); Assert.Throws <ArgumentOutOfRangeException>(() => album.Rate(10240)); album.Rate(3); client.Verify(c => c.Post(It.IsAny <string>(), It.IsAny <IList <IRequestParameter> >(), It.IsAny <DeezerPermissions>()), Times.Once()); }