Click here to Skip to main content
16,014,816 members
Home / Discussions / C#
   

C#

 
GeneralRe: why constructor ??? Pin
tasumisra16-Jun-08 3:03
tasumisra16-Jun-08 3:03 
GeneralRe: why constructor ??? Pin
Christian Graus16-Jun-08 3:08
protectorChristian Graus16-Jun-08 3:08 
GeneralRe: why constructor ??? Pin
darkelv16-Jun-08 5:14
darkelv16-Jun-08 5:14 
Questionmake active x component Pin
justintimberlake16-Jun-08 2:05
justintimberlake16-Jun-08 2:05 
AnswerRe: make active x component Pin
Christian Graus16-Jun-08 2:31
protectorChristian Graus16-Jun-08 2:31 
QuestionApplication of nunit for the method that does not return value Pin
sowmya k16-Jun-08 1:58
sowmya k16-Jun-08 1:58 
AnswerRe: Application of nunit for the method that does not return value Pin
N a v a n e e t h16-Jun-08 2:12
N a v a n e e t h16-Jun-08 2:12 
AnswerRe: Application of nunit for the method that does not return value Pin
Simon P Stevens16-Jun-08 3:12
Simon P Stevens16-Jun-08 3:12 
You can only test the public facing portion of the method.

Often methods that don't return anything are modifying something, like database state for example. Have NUnit check the state before and after the method is called to check that the results are as expected.

If the method really doesn't make any externally visible verifiable changes then there is nothing you can do, the method isn't testable beyond a simple "run to check it doesn't throw exceptions" type of test. This in itself is valuable, so still do this for a range of inputs.

Include Debug.Assert statements in the method itself to check inputs, mid point values and object states. (NUnit can be configured to treat debug assetions as test failures.)

Simon

QuestionApplication of nunit for the method taht does not return value Pin
sowmya k16-Jun-08 1:58
sowmya k16-Jun-08 1:58 
AnswerRe: Application of nunit for the method taht does not return value Pin
Roger Alsing16-Jun-08 4:03
Roger Alsing16-Jun-08 4:03 
QuestionDataGridView Pin
mohammadcom16-Jun-08 1:36
mohammadcom16-Jun-08 1:36 
Questionhow to merge single bitmaps to a multipage tiff Pin
stephan_00716-Jun-08 1:12
stephan_00716-Jun-08 1:12 
AnswerRe: how to merge single bitmaps to a multipage tiff Pin
Christian Graus16-Jun-08 1:20
protectorChristian Graus16-Jun-08 1:20 
AnswerRe: how to merge single bitmaps to a multipage tiff Pin
DaveyM6916-Jun-08 1:34
professionalDaveyM6916-Jun-08 1:34 
QuestionDataGridView Selected Just one Cell on rows Pin
mohammadcom16-Jun-08 1:01
mohammadcom16-Jun-08 1:01 
QuestionDPI and Scale Problem Pin
Ahmad Safwat16-Jun-08 0:12
Ahmad Safwat16-Jun-08 0:12 
QuestionOn choosing the apt datastructure Pin
Member 475670915-Jun-08 22:59
Member 475670915-Jun-08 22:59 
QuestionRe: On choosing the apt datastructure Pin
sunspeed15-Jun-08 23:21
sunspeed15-Jun-08 23:21 
Questionserialize a window control Pin
Elesh15-Jun-08 22:40
Elesh15-Jun-08 22:40 
AnswerRe: serialize a window control Pin
Guffa16-Jun-08 1:26
Guffa16-Jun-08 1:26 
AnswerRe: serialize a window control Pin
Simon P Stevens16-Jun-08 1:29
Simon P Stevens16-Jun-08 1:29 
QuestionC# and MySql Qeury not running Pin
bdiepeveen15-Jun-08 21:43
bdiepeveen15-Jun-08 21:43 
AnswerRe: C# and MySql Qeury not running Pin
Giorgi Dalakishvili15-Jun-08 21:53
mentorGiorgi Dalakishvili15-Jun-08 21:53 
AnswerRe: C# and MySql Qeury not running Pin
Guffa15-Jun-08 22:26
Guffa15-Jun-08 22:26 
QuestionString manipulation Pin
steve_rm15-Jun-08 21:35
steve_rm15-Jun-08 21:35 

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.