Click here to Skip to main content
15,880,967 members
Articles / Database Development / SQL Server

How design patterns can help you in developing unit testing-enabled applications

Rate me:
Please Sign up or sign in to vote.
4.61/5 (34 votes)
15 Nov 2007CPOL15 min read 127.1K   323   177  
This article shows how you can mix together Model-View-Presenter, Domain Model, Services, ActiveRecord, and Repository patterns to create a testable application.
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!--This file represents the results of running a test suite-->
<test-results name="C:\Deploy\CodeProject\Northwind\1.0\Northwind.Presentation.Test\Northwind.Presentation.Test.csproj" total="8" failures="0" not-run="0" date="2002-01-01" time="02:08:30">
  <environment nunit-version="2.4.1.0" clr-version="2.0.50727.42" os-version="Microsoft Windows NT 5.1.2600 Service Pack 2" platform="Win32NT" cwd="C:\Deploy\CodeProject\Northwind\1.0\Northwind.Presentation.Test" machine-name="SATELLITE" user="Bruno" user-domain="SATELLITE" />
  <culture-info current-culture="pt-BR" current-uiculture="pt-BR" />
  <test-suite name="C:\Deploy\CodeProject\Northwind\1.0\Northwind.Presentation.Test\Northwind.Presentation.Test.csproj" success="True" time="7.391" asserts="0">
    <results>
      <test-suite name="C:\Deploy\CodeProject\Northwind\1.0\Northwind.Presentation.Test\bin\Debug\Northwind.Presentation.Test.dll" success="True" time="7.391" asserts="0">
        <results>
          <test-suite name="Northwind" success="True" time="7.391" asserts="0">
            <results>
              <test-suite name="Presentation" success="True" time="7.375" asserts="0">
                <results>
                  <test-suite name="Test" success="True" time="7.375" asserts="0">
                    <results>
                      <test-suite name="ViewCustomerPresenterTest" success="True" time="7.313" asserts="0">
                        <results>
                          <test-case name="Northwind.Presentation.Test.ViewCustomerPresenterTest.DeleteCustomerTest" executed="True" success="True" time="0.625" asserts="0" />
                          <test-case name="Northwind.Presentation.Test.ViewCustomerPresenterTest.EditCustomerTest" executed="True" success="True" time="0.063" asserts="0" />
                          <test-case name="Northwind.Presentation.Test.ViewCustomerPresenterTest.InitializeTest" executed="True" success="True" time="0.000" asserts="0" />
                          <test-case name="Northwind.Presentation.Test.ViewCustomerPresenterTest.NewCustomerTest" executed="True" success="True" time="0.016" asserts="0" />
                          <test-case name="Northwind.Presentation.Test.ViewCustomerPresenterTest.SaveCustomerTest" executed="True" success="True" time="0.016" asserts="0" />
                          <test-case name="Northwind.Presentation.Test.ViewCustomerPresenterTest.SelectedCustomerChangedTest" executed="True" success="True" time="0.016" asserts="0" />
                          <test-case name="Northwind.Presentation.Test.ViewCustomerPresenterTest.ShowDatabaseTest" executed="True" success="True" time="6.516" asserts="0" />
                          <test-case name="Northwind.Presentation.Test.ViewCustomerPresenterTest.ShowInMemoryTest" executed="True" success="True" time="0.031" asserts="0" />
                        </results>
                      </test-suite>
                    </results>
                  </test-suite>
                </results>
              </test-suite>
            </results>
          </test-suite>
        </results>
      </test-suite>
    </results>
  </test-suite>
</test-results>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Instructor / Trainer Alura Cursos Online
Brazil Brazil

Comments and Discussions