© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
R. AstburyMicrosoft Orleans for Developershttps://doi.org/10.1007/978-1-4842-8167-3_8

8. Unit Testing

Richard Astbury1  
(1)
Woodbridge, UK
 

Some of the first code you’ll want to write is a test, to make sure the logic in your Grains is correct.

As we have discussed in this book, Grains are hosted by Silos, which provide turn-based concurrency, so to correctly test a grains, we need to use a Silos or a cluster of Silos.

Orleans makes this easy for us by providing a Test Cluster, which carries the same semantics as a real Silos, but without such a configuration burden.

In this chapter, we will write a unit test which will use the Test Cluster to send messages to ...

Get Microsoft Orleans for Developers: Build Cloud-Native, High-Scale, Distributed Systems in .NET Using Orleans now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.