Posts

Showing posts from September, 2018

Reactive Unit Testing

Reactive Unit TestingThe problemI have done a project using Reactive Extentions, but I have not been able to figure out how to write unit tests for it.
My plan is o create a simple example I can use to try unit testing reactive code.The solutionTo start with I am creating a new solution, with two projects, one is a simple .Net Standard project, and the other an XUnit project.
Add System.Reactive to both projects, and add Microsoft.Reactive.Testing to the test project.I want to start with something simple, like a counter that will return the next value every seccond.First TestThe first test will be to make sure it starts by returning a 0.
The outline of test class is:using System.Reactive.Linq;using System.Threading.Tasks;using Jonathan.ReactiveProject;using Xunit;namespace Jonathan.ReactiveProjectTests {publicclassReactiveObjectTests{[Fact]publicasync Task Sequence_Recieves_0(){var fixture =newReactiveObject();var result =await fixture.Sequence.FirstAsync(); Assert.Equal(0…

My recipe for Kvass

I have been tweaking a personal kvass recipy. I feel it has reached the point where it can be written down, although there may still be some editing done to it.Ingrediants500g rye breadabout 5l waterraisons (optional)100g sugar10g brewers yeastYou also will need some muslin cloth.Try get 100% rye. I have tried 60% and 100%, and the pure rye bread makes it a lot better.
I don’t like it too sweet, so try this, and adjust your sugar if you need to.
For a while the only yeast I could find was instant yeast. This still works, but it seems to activate a bit quickerProcessDry the breadThe first thing you want to do is break the bread up a bit (I break each slice into qurters) and lay it out in an ovan tray. Bake the bread on about 180 until it has compltly dried out, turning it over once the top has dried out.I find that it is best to pull it out just before the bread starts to burn. If it starts to smoke it has been in a little to long, but the point just before that is purfect.You can also…