3 Rules for TDD

I couldn't help but share this. There couldn't be a better way to summarize the unwritten rules of TDD, than the one wrote by Uncle Bob in his famous book 'Agile Principles, Patterns and Practices in C#''. Don't write any production code until you have written a failing unit test. Don't write more of a … Continue reading 3 Rules for TDD

Mock RestClient.ExecuteAsync

RestSharp is not a stranger to developers, so is the usage. What this posts aims to explore is how to do Unit Test a method, involving a RestClient.ExecuteAsync call. To be more precise, the post explores how to mock the RestClient for the method. Let's consider the following code, taken from VSPostman, one of the … Continue reading Mock RestClient.ExecuteAsync