From the course: Rust for C# Developers

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Testing

Testing

- [Instructor] Having good tests with good test coverage is central to successful modern software. No matter if it's your own seldomly maintained project, a public open source project, code running live in a cloud solution or any other scenario. Having good tests allow for predictable functionality in a code base, which in its turn, allows for maintainability, avoidance of obvious bugs, and general trust in your code, especially over time. This has probably been kept well in mind when Rust was created, given that it has a standard testing functionality built into it. But also some potentially useful testing functionality that we have not seen before as developers used to C# and .NET. Unit tests are a great way to verify logic inside of code blocks that don't have external dependencies. Rust has syntax very similar to testing frameworks in C# and .NET, where you write a function method in C#, annotate it with a…

Contents