Click here to Skip to main content
15,906,626 members
Home / Discussions / C#
   

C#

 
AnswerRe: I have a problem with Convert.FromBase64String Pin
J a a n s28-Apr-09 21:59
professionalJ a a n s28-Apr-09 21:59 
GeneralRe: I have a problem with Convert.FromBase64String Pin
Roshanakak28-Apr-09 22:13
Roshanakak28-Apr-09 22:13 
GeneralRe: I have a problem with Convert.FromBase64String Pin
Luc Pattyn28-Apr-09 23:56
sitebuilderLuc Pattyn28-Apr-09 23:56 
GeneralRe: I have a problem with Convert.FromBase64String Pin
J a a n s29-Apr-09 0:04
professionalJ a a n s29-Apr-09 0:04 
Questionunit testing function Pin
BabyOreo28-Apr-09 20:23
BabyOreo28-Apr-09 20:23 
AnswerRe: unit testing function Pin
SeMartens28-Apr-09 21:05
SeMartens28-Apr-09 21:05 
GeneralRe: unit testing function Pin
BabyOreo29-Apr-09 15:03
BabyOreo29-Apr-09 15:03 
GeneralRe: unit testing function Pin
SeMartens29-Apr-09 21:09
SeMartens29-Apr-09 21:09 
Well using assert is necessary. What you want to test is whether your saveRecord()-method works correct. What if the method has a bug and txtcode and txtname are interchanged. You won't get an exception, so you will need an Assert. (Whenever you don't get an exception, use Assert !)

After saving the record you have to read the values which were stored. Use the Assert-statement to check if the values are stored correctly.

...
target.saverecord();

// read the values
// use Assert to check if the read values are correct
Assert.IsTrue(...Equals("19095"));


As I said before, I suggest to refactor your code so that you have a datalayer and a GUI. This will make unit testing easier. Also take a quick look into the NUnit-Quickstart documentation. They provide a well-known example.

Regards
Sebastian

It's not a bug, it's a feature!

Check out my CodeProject article Permission-by-aspect.

Me in Softwareland.

QuestionCapture network Video stream? Pin
IvanBeograd28-Apr-09 20:03
IvanBeograd28-Apr-09 20:03 
AnswerRe: Capture network Video stream? Pin
IvanBeograd5-May-09 14:10
IvanBeograd5-May-09 14:10 
QuestionNot able to receive data using tcp(urgent!) Pin
patra.santanu@yahoo.co.in28-Apr-09 19:56
patra.santanu@yahoo.co.in28-Apr-09 19:56 
Questionsave gridview values in database Pin
grkrishna28-Apr-09 19:10
grkrishna28-Apr-09 19:10 
AnswerRe: save gridview values in database Pin
grkrishna28-Apr-09 22:26
grkrishna28-Apr-09 22:26 
AnswerRe: save gridview values in database [modified] Pin
sorifazlu14-Sep-11 23:26
sorifazlu14-Sep-11 23:26 
Questionfind .lib, .dll in exe Pin
RKP72828-Apr-09 19:05
RKP72828-Apr-09 19:05 
AnswerRe: find .lib, .dll in exe Pin
RKP72828-Apr-09 19:06
RKP72828-Apr-09 19:06 
QuestionHow can I get the time taken for PDF getting downloaded when it is opened on Internet Explorer? Pin
svt gdwl28-Apr-09 18:19
svt gdwl28-Apr-09 18:19 
AnswerRe: How can I get the time taken for PDF getting downloaded when it is opened on Internet Explorer? Pin
_Maxxx_28-Apr-09 19:45
professional_Maxxx_28-Apr-09 19:45 
QuestionUnable to load DLL - Why ?? Pin
matty2desmara28-Apr-09 15:53
matty2desmara28-Apr-09 15:53 
AnswerRe: Unable to load DLL - Why ?? Pin
Luc Pattyn28-Apr-09 16:31
sitebuilderLuc Pattyn28-Apr-09 16:31 
GeneralRe: Unable to load DLL - Why ?? Pin
matty2desmara29-Apr-09 4:08
matty2desmara29-Apr-09 4:08 
AnswerRe: Unable to load DLL - Why ?? Pin
jas0n2328-Apr-09 23:27
jas0n2328-Apr-09 23:27 
GeneralRe: Unable to load DLL - Why ?? Pin
matty2desmara29-Apr-09 4:20
matty2desmara29-Apr-09 4:20 
AnswerRe: Unable to load DLL - Why ?? Pin
matty2desmara29-Apr-09 4:54
matty2desmara29-Apr-09 4:54 
AnswerRe: Unable to load DLL - Why ?? Pin
S. Senthil Kumar30-Apr-09 9:53
S. Senthil Kumar30-Apr-09 9:53 

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.