In previous article we’ve discussed possibility of using reflection for convention tests. Today I would like to focus on manual file inspection.
Continue reading “Convention tests – file reading”
One of the first thing that I’ve found learning C# is how powerful reflection is here. It is also easy to use it in comparison to Java. The code looks often more elegant and clean. Today I would like to take a look at reflection api in order to found parts that might be useful for convention testing.
Continue reading “Convention tests – reflection”
In one of our project we are using RabbitMQ queue for communication. In C# there is a popular library called MassTransit that (besides other things) allows you to use RabbitMQ. It is non trivial to test communication through external queue. At the same time there are many things that you need to remember in order to see message sent by a publisher later received by a consumer. That makes testing even more difficult, so we tried to unit-test as much things as possible to minimize scope of manual testing. One of the many things that you need to remember is that event class should have correct serialization attributes on each of property that we want to send. So we wrote the test that takes all implementations of our marker interface and for each of them we’ve checked if proper attribute is set on properties.
Continue reading “Introduction to convention tests in .net”