Click here to Skip to main content
13,086,266 members (67,181 online)

.NET Framework

 
AnswerRe: [VB.NET 2008] How to get control on objects created at runtime Pin
Eddy Vluggen5-Dec-12 5:40
memberEddy Vluggen5-Dec-12 5:40 
GeneralRe: [VB.NET 2008] How to get control on objects created at runtime Pin
steve_94966135-Dec-12 20:59
membersteve_94966135-Dec-12 20:59 
GeneralRe: [VB.NET 2008] How to get control on objects created at runtime Pin
Eddy Vluggen6-Dec-12 2:27
memberEddy Vluggen6-Dec-12 2:27 
GeneralRe: [VB.NET 2008] How to get control on objects created at runtime Pin
steve_94966136-Dec-12 3:26
membersteve_94966136-Dec-12 3:26 
GeneralRe: [VB.NET 2008] How to get control on objects created at runtime Pin
Eddy Vluggen6-Dec-12 5:02
memberEddy Vluggen6-Dec-12 5:02 
GeneralRe: [VB.NET 2008] How to get control on objects created at runtime Pin
steve_94966136-Dec-12 21:25
membersteve_94966136-Dec-12 21:25 
GeneralRe: [VB.NET 2008] How to get control on objects created at runtime Pin
Eddy Vluggen7-Dec-12 1:16
memberEddy Vluggen7-Dec-12 1:16 
QuestionTesting Practices Pin
Andrew Stoute5-Dec-12 4:44
memberAndrew Stoute5-Dec-12 4:44 
Let's assume you have a method similar to this one:

    public void SomeMethod(string myParam) {
        if (string.IsNullOrEmpty(myParam) {
            throw new Exception();
        }
 
        // The rest of the very useful method 
    }


When writing unit tests do you write tests that cover all of the variations of what could trip the exception?

i.e. one test each where
myParam = null
myParam = string.empty
myParam = "    "

Or do you just write one of the above tests?

I tend to write all 3 tests. And, similarly, if a positive integer is required I'll have a test for the integer being 0 and one for it being < 0 since the operators are potentially different.

Just wondered what you guys thought, and if I'm overdoing the testing.

Andrew
"My days of not taking you seriously are certainly coming to a middle."

AnswerRe: Testing Practices Pin
Eddy Vluggen5-Dec-12 5:36
memberEddy Vluggen5-Dec-12 5:36 
GeneralRe: Testing Practices Pin
Andrew Stoute5-Dec-12 5:45
memberAndrew Stoute5-Dec-12 5:45 
GeneralRe: Testing Practices Pin
Eddy Vluggen5-Dec-12 5:53
memberEddy Vluggen5-Dec-12 5:53 
GeneralRe: Testing Practices Pin
Dave Kreskowiak5-Dec-12 6:29
mvpDave Kreskowiak5-Dec-12 6:29 
GeneralRe: Testing Practices Pin
Dave Kreskowiak5-Dec-12 6:26
mvpDave Kreskowiak5-Dec-12 6:26 
GeneralRe: Testing Practices Pin
Eddy Vluggen5-Dec-12 6:34
memberEddy Vluggen5-Dec-12 6:34 
GeneralRe: Testing Practices Pin
Dave Kreskowiak5-Dec-12 9:55
mvpDave Kreskowiak5-Dec-12 9:55 
GeneralRe: Testing Practices Pin
Eddy Vluggen6-Dec-12 0:08
memberEddy Vluggen6-Dec-12 0:08 
QuestionHow to make a list view and gallerie view on a product page list on some e-commerce Pin
El daniel4-Dec-12 0:19
memberEl daniel4-Dec-12 0:19 
AnswerRe: How to make a list view and gallerie view on a product page list on some e-commerce Pin
Eddy Vluggen4-Dec-12 0:37
memberEddy Vluggen4-Dec-12 0:37 
Questionframework 2.0 and win98 Pin
caradri3-Dec-12 22:37
membercaradri3-Dec-12 22:37 
AnswerRe: framework 2.0 and win98 Pin
Richard MacCutchan3-Dec-12 23:01
mvpRichard MacCutchan3-Dec-12 23:01 
AnswerRe: framework 2.0 and win98 Pin
Eddy Vluggen3-Dec-12 23:04
memberEddy Vluggen3-Dec-12 23:04 
AnswerRe: framework 2.0 and win98 Pin
Pete O'Hanlon3-Dec-12 23:07
protectorPete O'Hanlon3-Dec-12 23:07 
GeneralRe: framework 2.0 and win98 Pin
Eddy Vluggen3-Dec-12 23:31
memberEddy Vluggen3-Dec-12 23:31 
GeneralRe: framework 2.0 and win98 Pin
Pete O'Hanlon3-Dec-12 23:38
protectorPete O'Hanlon3-Dec-12 23:38 
GeneralRe: framework 2.0 and win98 Pin
Eddy Vluggen3-Dec-12 23:43
memberEddy Vluggen3-Dec-12 23:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy |
Web01 | 2.8.170813.1 | Last Updated 17 Aug 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid