Testing: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 19: Line 19:
* A <tt>...TestBase</tt> is an abstract class that has a protected abstract <tt>get...ToTest()</tt> method.
* A <tt>...TestBase</tt> is an abstract class that has a protected abstract <tt>get...ToTest()</tt> method.
* If in developing a <tt>SomethingBase</tt> we want to test the base behavior at its own layer, then conventionally we should use a <tt>SomethingTestBase</tt> (and not a <tt>SomethingBaseTestBase</tt>).
* If in developing a <tt>SomethingBase</tt> we want to test the base behavior at its own layer, then conventionally we should use a <tt>SomethingTestBase</tt> (and not a <tt>SomethingBaseTestBase</tt>).
=Concepts=
=<span id='Mock'></span><span id='Stub'></span>Concepts=
==Mock==
{{Internal|Software Testing Concepts|Testing Concepts}}
==Stub==


=To Process=
=To Process=

Revision as of 23:57, 15 July 2021

External

Internal

Fundamentals and Conventions

  • Access classes are BAD. Write test classes to belong the same package as the tested classes, this way package private functionality can be tested even if the test classes are physically in a different location.
  • A ...TestBase is an abstract class that has a protected abstract get...ToTest() method.
  • If in developing a SomethingBase we want to test the base behavior at its own layer, then conventionally we should use a SomethingTestBase (and not a SomethingBaseTestBase).

Concepts

Testing Concepts

To Process