pub struct MockPostsQueries {}Expand description
Struct that contains some utility methods to mock data of the Desmos x/posts module.
Implementations§
Source§impl MockPostsQueries
impl MockPostsQueries
Sourcepub fn get_mocked_post(subspace_id: u64, section_id: u32, post_id: u64) -> Post
pub fn get_mocked_post(subspace_id: u64, section_id: u32, post_id: u64) -> Post
Function that mock a post.
Sourcepub fn get_mocked_attachment(
subspace_id: u64,
post_id: u64,
attachment_id: u32,
) -> Attachment
pub fn get_mocked_attachment( subspace_id: u64, post_id: u64, attachment_id: u32, ) -> Attachment
Function that mocks a attachment.
Sourcepub fn get_mocked_user_answer(
subspace_id: u64,
post_id: u64,
poll_id: u32,
user: Addr,
) -> UserAnswer
pub fn get_mocked_user_answer( subspace_id: u64, post_id: u64, poll_id: u32, user: Addr, ) -> UserAnswer
Function that mocks a poll answers.
Sourcepub fn get_mocked_subspace_posts(subspace_id: u64) -> Vec<Post>
pub fn get_mocked_subspace_posts(subspace_id: u64) -> Vec<Post>
Function that mocks the posts inside a subspace.
Sourcepub fn get_mocked_subspace_posts_response() -> QuerySubspacePostsResponse
pub fn get_mocked_subspace_posts_response() -> QuerySubspacePostsResponse
Function that mocks a QuerySubspacePostsResponse.
Sourcepub fn get_mocked_section_posts(subspace_id: u64, section_id: u32) -> Vec<Post>
pub fn get_mocked_section_posts(subspace_id: u64, section_id: u32) -> Vec<Post>
Functions that mocks the posts inside a section.
Sourcepub fn get_mocked_section_posts_response() -> QuerySectionPostsResponse
pub fn get_mocked_section_posts_response() -> QuerySectionPostsResponse
Function that mocks a QuerySectionPostsResponse.
Sourcepub fn get_mocked_post_response() -> QueryPostResponse
pub fn get_mocked_post_response() -> QueryPostResponse
Function that mocks a QueryPostResponse.
Sourcepub fn get_mocked_post_attachments(
subspace_id: u64,
post_id: u64,
) -> Vec<Attachment>
pub fn get_mocked_post_attachments( subspace_id: u64, post_id: u64, ) -> Vec<Attachment>
Function that mocks post attachments.
Sourcepub fn get_mocked_post_attachments_response() -> QueryPostAttachmentsResponse
pub fn get_mocked_post_attachments_response() -> QueryPostAttachmentsResponse
Function that mocks a QueryPostAttachmentsResponse.
Sourcepub fn get_mocked_poll_answers(
subspace_id: u64,
post_id: u64,
poll_id: u32,
) -> Vec<UserAnswer>
pub fn get_mocked_poll_answers( subspace_id: u64, post_id: u64, poll_id: u32, ) -> Vec<UserAnswer>
Function that mocks poll answers list.
Sourcepub fn get_mocked_poll_answers_response() -> QueryPollAnswersResponse
pub fn get_mocked_poll_answers_response() -> QueryPollAnswersResponse
Function that mocks a QueryPollAnswersResponse.
Auto Trait Implementations§
impl Freeze for MockPostsQueries
impl RefUnwindSafe for MockPostsQueries
impl Send for MockPostsQueries
impl Sync for MockPostsQueries
impl Unpin for MockPostsQueries
impl UnwindSafe for MockPostsQueries
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more