Click here to Skip to main content
15,881,898 members
Articles / Programming Languages / C#

Testable Applications

Rate me:
Please Sign up or sign in to vote.
3.30/5 (9 votes)
20 Apr 200712 min read 45.2K   198   35  
Make your application testable.
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;

namespace TestableApplication.Testable.Dalc
{
    public abstract class DalcBase<T> 
    {
        public abstract T Make(DataRow dr);
        
        public virtual object ExecuteStoredScalerProcedure(string procedureName, List<SqlParameter> parameters)
        {
            Console.WriteLine("--- ExecuteStoredScalerProcedure Method was invoked to Execute {0} for object  ",procedureName,typeof(T).FullName);
            Console.WriteLine("press enter to continue ....");
            Console.ReadLine();
            return new object();
        }
        public virtual DataTable ExecuteStoredProcedure(string procedureName, List<SqlParameter> parameters)
        {
            Console.WriteLine("--- ExecuteStoredScalerProcedure Method was invoked to Execute {0} for object  ", procedureName, typeof(T).FullName);
            Console.WriteLine("press enter to continue ....");
            Console.ReadLine();
            return new DataTable();
        }
    }
}

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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Software Developer (Senior) NSW Curriculum & Learning Innovation Centre
Australia Australia
I am a senior developer self taught,
the main study is electronics and communication engineering

I am working as senior programmer in center for learning and innovation
www.cli.nsw.edu.au

I develop Software since 1995 using Delphi with Microsoft SQL Server

before 2000, I didn’t like Microsoft tools and did many projects using all database tools and other programming tools specially Borland C++ Builder, Delphi, Power Builder
And I loved Oracle database for its stability until I was certified as Master in Database Administration from Oracle University.

I tried to work in web programming but I felt that Java is hard and slow in programming, specially I love productivity.

I began worked with .Net since 2001 , and at the same time Microsoft SQL Server 7 was very stable so I switched all my way to Microsoft Tech.
I really respect .Net Platform especially in web applications

I love database Applications too much
And built library with PowerBuilder it was very useful for me and other developers

I have a wide experience due to my work in different companies
But the best experience I like in wireless applications, and web applications.
The best Application I did in my life is Novartis Marketing System 1999 it takes 8 months developing with PowerBuilder and Borland C++, SQL Server
Performance was the key challenge in this Application.
The other 2 applications that I loved Multilingual Project in Scada company in Italy 2000 and SDP Mobile media content platform server for ChinaUnicom 2004
I hope that you enjoy any Article I post.
God bless you.

Comments and Discussions