Tag Archive: Basics

Sep
01

“Why Too Much Mocking is Bad” and Other Questions

Last webinar, “10 secret unit testing tips” was a blast. There were many questions, some I’ve answered. But then I’ve looked at the clock, and discovered I neglected to answer a few. And since I’m a a man of my word (most of the time), here are the rest of the questions and comments and …

Continue reading »

Permanent link to this article: http://www.typemock.com/blog/2011/09/01/%e2%80%9cwhy-too-much-mocking-is-bad%e2%80%9d-and-other-questions/

Aug
23

How To Name Your Tests Effectively

This is secret unit testing tip #5. Want more? Register to the webinar. What are tests for? (if you still think that the question is stupid after reading this, let me know in the comments). Obviously they are there to protect you from bugs. When a bug creeps in, the tests will catch it, and …

Continue reading »

Permanent link to this article: http://www.typemock.com/blog/2011/08/23/how-to-name-your-tests-effectively/

Aug
15

Unit Testing is a Team Sport

This is secret unit testing tip #7. Want more? Register to the webinar. Anyone can do unit testing. It’s a skill that needs to be learned and practiced and improved over time, and anyone can start writing unit tests today. As you and I know, it’s well worth the effort. But is it sustainable? Gil’s …

Continue reading »

Permanent link to this article: http://www.typemock.com/blog/2011/08/15/unit-testing-is-a-team-sport/

Aug
09

What is the difference between unit tests and integration tests?

This is secret unit testing tip #4. Want more? Register to the webinar. Many people who start out writing tests get hung out the semantic difference. What is a unit? When does a unit test cross the border to integration land? Is it a narrow border or a wide plateau between them? For me, it’s …

Continue reading »

Permanent link to this article: http://www.typemock.com/blog/2011/08/09/what-is-the-difference-between-unit-tests-and-integration-tests-2/

Jan
19

Free Typemock Webinar: Starting Unit Testing in C++ with Isolator++

Next Wednesday, January 26th, we’re going to have our monthly Typemock webinar. This time, we’ve moved the webinar a bit later, to 4pm CET/ 10am EST. In this webinar, Gil Zilberfeld will guide you through the setup needed to write unit tests in C++. We’ll walk through different scenarios that happen in existing code, where …

Continue reading »

Permanent link to this article: http://www.typemock.com/blog/2011/01/19/free-typemock-webinar-starting-unit-testing-in-c-with-isolator/

Dec
30

Isolator++ 1.1 Released

Time for another release, And this one, has a few power punches. With the newly Introduced RET macro, Isolator can now fake a ref argument, actually returning it as the method returns. So if you have this method to test: bool PricingManager::IsExpired(){ SYSTEMTIME now; ::GetSystemTime(&now); if (now.wYear > 2010) return true; return false;} And that GetSystemTime needs …

Continue reading »

Permanent link to this article: http://www.typemock.com/blog/2010/12/30/isolator-1-1-released/

Oct
25

How-To: Running Custom Code With DoMemberFunctionInstead Clauses Using Isolator++

Isolator++ APIs make it easy to return custom values or objects. It’s really easy to return values or control behavior of one or more methods. But sometimes you want more than that: You want to run your own code when a method gets called. You want to call a supplied method, change a static flag’s …

Continue reading »

Permanent link to this article: http://www.typemock.com/blog/2010/10/25/how-to-running-custom-code-with-domemberfunctioninstead-clauses-using-isolator/

Oct
11

How-To: Asserting A Method Was Called With Isolator++

Many times, when we come to determine a test pass/fail criterion, we use some sort of ASSERT statement. ASSERT usually tests for state – checking on field values, to determine if that value is the expected one. However, sometimes we don’t have this luxury. The state may not be exposed, or the class members are …

Continue reading »

Permanent link to this article: http://www.typemock.com/blog/2010/10/11/how-to-asserting-a-method-was-called-with-isolator/

Oct
07

How-to: Changing Behavior of Static Methods with Isolator++

Isolator++ can change the behavior of methods very easily, without changing the original implementation. When you change the behavior of an instance or a static method, you can do that in different fashions. We have a Person class. It has a method called IsFromLA we’d like to test: bool Person::IsLivingInLA() {     Address* address = …

Continue reading »

Permanent link to this article: http://www.typemock.com/blog/2010/10/07/how-to-changing-behavior-of-static-methods-with-isolator/

Oct
06

Isolator++: Introduction

Isolator++ is the new isolation framework from Typemock. In C++ everything is harder, even unit testing, believe it or not. When people start doing unit tests, they run into the dependency problem. And this is where Isolator++ comes to the rescue. But let’s go back to the beginning. There are a couple of test frameworks …

Continue reading »

Permanent link to this article: http://www.typemock.com/blog/2010/10/06/isolator-introduction/

Older posts «