Denis Gladkikh
Russian   |  English

Selected Tag: TDD

The art of Unit Testing with Examples in .NET

osherove_coverFirst time when I familiarized with unit testing was 5 or 6 years ago. It was start of my developing career. I remember that somebody told me about code coverage. At that time I didn’t write any Unit tests. Guy, who was my team lead, told me “Do you see operator if with three conditions? You should check all of these conditions”. So, after that I had written some code, I should go to interface and try to invoke all code which I wrote from user interface. Nice? At current time I know little more about tests and unit testing. I have not participated in projects, designed by Test Driven Development (TDD). Basics of my knowledge are a spying code of my colleagues, some articles and screencasts. I had decide that I should know much more, and became a real professional of unit testing, this is why I had start to read book The art of Unit Testing with Examples in .NET. More than, in my current job place looks like I’m just one who writing unit tests for my code. I should show good examples of my tests.



Continuous integration

Few days ago I have an experience with setting CCNet build server for continuous integration environment. What is it continuous integration and why you need to know it you can learn from many articles, and the better of course is article written by Martin Fowler. Also you can read a book Continuous Integration: Improving Software Quality and Reducing Risk, which Martin Fowler advises well.

Below I will try to tell you main steps of setting continuous integration environment and will give you some advices. Also I will glad to look response and advices from you. So, what is it continuous integration? In this case word integration mean integration not across some systems (applications), as you can think when you will heart this phrase first time (this was my case). In this case this word means integration across team members.



Regular Expressions. Remember it, write it, test it.

I should say that I’m fan of regular expressions. Whenever I see the problem, which I can solve with Regex, I felt a burning desire to do it and going to write new test for new regex. Previously I had installed SharpDevelop Studio just for good regular expression tool in it (Why VS doesn’t have one?). But now I’m a little wiser, and for each Regex I write a separate test.

I find it difficult to remember the syntax of regular expressions (I don’t write them very often); I always forget which character is responsible for the beginning of the line, etc. So I use external small and easy articles like this “Regular expressions - An introduction”.

Now I want to show you little samples of regular expressions and want to show you how to test these samples.