Click here to Skip to main content
15,925,602 members
Home / Discussions / C#
   

C#

 
Questioncannot convert char* to object or string? Pin
cristi_alonso23-May-08 1:41
cristi_alonso23-May-08 1:41 
AnswerRe: cannot convert char* to object or string? Pin
DaveyM6923-May-08 1:55
professionalDaveyM6923-May-08 1:55 
AnswerRe: cannot convert char* to object or string? Pin
leppie23-May-08 8:49
leppie23-May-08 8:49 
QuestionAccessing an ArrayList from a sub-form Pin
Dirk.Bock23-May-08 0:27
Dirk.Bock23-May-08 0:27 
AnswerRe: Accessing an ArrayList from a sub-form Pin
Phil J Pearson23-May-08 0:51
Phil J Pearson23-May-08 0:51 
AnswerRe: Accessing an ArrayList from a sub-form Pin
DaveyM6923-May-08 1:28
professionalDaveyM6923-May-08 1:28 
QuestionUsing NUnit to test class which uses external XML file. Pin
N a v a n e e t h23-May-08 0:01
N a v a n e e t h23-May-08 0:01 
AnswerRe: Using NUnit to test class which uses external XML file. Pin
Colin Angus Mackay23-May-08 0:13
Colin Angus Mackay23-May-08 0:13 
N a v a n e e t h wrote:
Is this a good approach or any other better methods available for this scenario ?


No. The test is invalid because the code you are testing is not the code you will be running in the live system. The class under test should never know if it is in a testing state or not. It should run the same way regardless of it being in a test or live.

You may want to have some way of determining which file is opened from outside the class. e.g. The name is in some config information. You may want to consider using mock objects to mock out the file access and provide your own (although it is probably still easier to provide a test file).

Also, you may find that you have a specific bug that requires something specific in the file. You need the ability to run the test against many different files.


GeneralRe: Using NUnit to test class which uses external XML file. Pin
N a v a n e e t h23-May-08 0:57
N a v a n e e t h23-May-08 0:57 
GeneralRe: Using NUnit to test class which uses external XML file. Pin
Colin Angus Mackay23-May-08 4:11
Colin Angus Mackay23-May-08 4:11 
QuestionProblem in ReportDocument.Export() function. [modified] Pin
Nitten22-May-08 23:55
Nitten22-May-08 23:55 
QuestionDictionary. Can anyone spot whats going on here? Pin
MarkB77722-May-08 22:41
MarkB77722-May-08 22:41 
AnswerRe: Dictionary. Can anyone spot whats going on here? Pin
Giorgi Dalakishvili22-May-08 22:47
mentorGiorgi Dalakishvili22-May-08 22:47 
GeneralRe: Dictionary. Can anyone spot whats going on here? Pin
MarkB77723-May-08 0:00
MarkB77723-May-08 0:00 
GeneralRe: Dictionary. Can anyone spot whats going on here? Pin
Giorgi Dalakishvili23-May-08 7:02
mentorGiorgi Dalakishvili23-May-08 7:02 
AnswerRe: Dictionary. Can anyone spot whats going on here? Pin
The Nightcoder23-May-08 15:26
The Nightcoder23-May-08 15:26 
GeneralRe: Dictionary. Can anyone spot whats going on here? Pin
MarkB77723-May-08 16:17
MarkB77723-May-08 16:17 
GeneralRe: Dictionary. Can anyone spot whats going on here? Pin
The Nightcoder23-May-08 16:29
The Nightcoder23-May-08 16:29 
QuestionHow to bind property to control (through this[string]) Pin
El'Cachubrey22-May-08 22:33
El'Cachubrey22-May-08 22:33 
AnswerRe: How to bind property to control (through this[string]) Pin
darkelv22-May-08 23:00
darkelv22-May-08 23:00 
GeneralRe: How to bind property to control (through this[string]) Pin
El'Cachubrey22-May-08 23:05
El'Cachubrey22-May-08 23:05 
GeneralRe: How to bind property to control (through this[string]) Pin
darkelv23-May-08 0:00
darkelv23-May-08 0:00 
GeneralRe: How to bind property to control (through this[string]) Pin
El'Cachubrey23-May-08 1:21
El'Cachubrey23-May-08 1:21 
GeneralRe: How to bind property to control (through this[string]) [modified] Pin
darkelv23-May-08 1:31
darkelv23-May-08 1:31 
GeneralRe: How to bind property to control (through this[string]) Pin
El'Cachubrey23-May-08 1:49
El'Cachubrey23-May-08 1:49 

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.