Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7052279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:21:52+00:00 2026-05-28T03:21:52+00:00

I got a Repository with a public Subject<Item> called Mutations to which can be

  • 0

I got a Repository with a public Subject<Item> called Mutations to which can be subscribed. It’s easier to see the observable as a stream of Item of which the source will primary be a socket connection.

I subscribe to the stream using something like Repository.Mutations.Subscribe(item => DoWhatever(item));.

I got a mocked datasource to which I want to push Items to test whether this Stream/Observable in the repository is doing it’s job.

I’ve been reading a lot about using the TestScheduler() in Rx but I’m completely lost when trying to create a unit test and how this scheduler would come into play using my own code.

Admittedly I’m a beginner with Rx but I hope someone would be able to give me a hint or two.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T03:21:53+00:00Added an answer on May 28, 2026 at 3:21 am

    If what you’re after is to see if an item is produced by the Mutations property, you can do like you have, but just verify, in your test code, that the actual subscribe method has been called, i.e. something like:

    Item expectedItem = new Item();
    Item actualItem = null;
    Repository.Mutations.Subscribe(item => actualItem = item);
    dataSource.PushItem(expectedItem);
    
    Assert.AreSame(expectedItem, actualItem);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We've got the following repository method public IList<Foo> GetItems(int fooId, int pageIndex, int pageSize
I've got a class with one public method and many private methods which are
I've got this repository method: public virtual T Get<T>(object primaryKey) where T : IDalRecord,
We've got in a corporate environment an svn repository structure which looks like this:
I got a SVN repository copied onto my computer using svnsync. Now when I
I've got a Git repository that has some files with DOS format ( \r\n
I've got a git repository with two branches, master and amazing_new_feature . The latter
I've got a Subversion repository that our Atlassian Fisheye instances nearly chokes on because
So I've got a local repository with two branches: master and shop . I've
I've already got my subversion repository set up to require comments of a minimum

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.