public void PhotoFeedTypeTest() { // get test Assert.That(PhotoFeedType.Photo.ToString(), Is.EqualTo("photo")); Assert.That(PhotoFeedType.PhotoTag.ToString(), Is.EqualTo("photo_tag")); // parse test Assert.That(PhotoFeedType.FromJsonString("photo"), Is.EqualTo(PhotoFeedType.Photo)); Assert.That(PhotoFeedType.FromJsonString("photo_tag"), Is.EqualTo(PhotoFeedType.PhotoTag)); }
public void PhotoFeedTypeTest() { // get test Assert.That(actual: PhotoFeedType.Photo.ToString(), expression: Is.EqualTo(expected: "photo")); Assert.That(actual: PhotoFeedType.PhotoTag.ToString(), expression: Is.EqualTo(expected: "photo_tag")); // parse test Assert.That(actual: PhotoFeedType.FromJsonString(response: "photo"), expression: Is.EqualTo(expected: PhotoFeedType.Photo)); Assert.That(actual: PhotoFeedType.FromJsonString(response: "photo_tag") , expression: Is.EqualTo(expected: PhotoFeedType.PhotoTag)); }
public ReadOnlyCollection<Photo> Get(long? ownerId = null, long? albumId = null, IEnumerable<long> photoIds = null, bool? rev = null, bool? extended = null, PhotoFeedType feedType = null, DateTime? feed = null, bool? photoSizes = null, int? offset = null, int? count = null) { VkErrors.ThrowIfNumberIsNegative(() => offset); VkErrors.ThrowIfNumberIsNegative(() => count); var parameters = new VkParameters { {"owner_id", ownerId}, {"album_id", albumId}, {"photo_ids", photoIds}, {"rev", rev}, {"extended", extended}, {"feed_type", feedType}, {"feed", feed}, {"photo_sizes", photoSizes}, {"offset", offset}, {"count", count} }; VkResponseArray response = _vk.Call("photos.get", parameters); return response.ToReadOnlyCollectionOf<Photo>(x => x); }