Skip to content

pmbanka/rx-test-marbles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rx-test-marbles

This is an experimental C# DSL for testing Rx streams.

This library is a port of RxJS Marble Tests so all credits goes to them. Syntax for defining observables is identical.

Example usage (see more in the tests project):

[Fact]
public void MergeObservablesWorksCorrectly()
{
    using (var s = new MarbleScheduler())
    {
        var e1 = s.Hot("----a--^--b-------c--|");
        var e2 = s.Hot(  "---d-^--e---------f-----|");
        var expected =        "---(be)----c-f-----|";
        s.ExpectObservable(e1.Merge(e2)).ToBe(expected);
    }
}

I'm not sure whether this DSL is something useful or not, hence no Nuget. If (for some weird reason) you would like to use this code, consider using Paket's Github dependency.

About

C# DSL for testing Rx (inspired by RxJS Marble Tests)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published