Click here to Skip to main content
15,889,898 members
Home / Discussions / C#
   

C#

 
AnswerRe: Asynchronous socket programming Pin
Paulo Zemek24-Feb-10 8:40
mvaPaulo Zemek24-Feb-10 8:40 
GeneralRe: Asynchronous socket programming Pin
Frozzeg24-Feb-10 9:23
Frozzeg24-Feb-10 9:23 
QuestionAnyone else using ADO.Net 2.0, stored procedures and wcf for databinding rather than using another framwork? Pin
ToddHileHoffer24-Feb-10 7:13
ToddHileHoffer24-Feb-10 7:13 
AnswerRe: Anyone else using ADO.Net 2.0, stored procedures and wcf for databinding rather than using another framwork? Pin
Dr.Walt Fair, PE24-Feb-10 7:49
professionalDr.Walt Fair, PE24-Feb-10 7:49 
GeneralRe: Anyone else using ADO.Net 2.0, stored procedures and wcf for databinding rather than using another framwork? Pin
ToddHileHoffer24-Feb-10 9:25
ToddHileHoffer24-Feb-10 9:25 
AnswerRe: Anyone else using ADO.Net 2.0, stored procedures and wcf for databinding rather than using another framwork? Pin
PIEBALDconsult24-Feb-10 8:55
mvePIEBALDconsult24-Feb-10 8:55 
GeneralRe: Anyone else using ADO.Net 2.0, stored procedures and wcf for databinding rather than using another framwork? Pin
ToddHileHoffer24-Feb-10 9:26
ToddHileHoffer24-Feb-10 9:26 
QuestionAre tests ugly? Pin
Member 448708324-Feb-10 6:45
Member 448708324-Feb-10 6:45 
I have written quite a few automated tests now with things like NUnit, and I find that they generally don't look very elegant. I find that code reuse is usually very difficult and code all ends up looking very similar. Books generally only show simple cases and in the real world with databases etc. things aren't quite so simple.

A good example of what I mean is database stuff. Every table works in pretty much the same way, but they all have different fields and types so you can't reuse much code. I find that most of my code looks like this:
SetupConnectionEtc();<br />
SetupDataForTest();<br />
DoSomething();<br />
ReadTheDataAndCheckEverything();

Although the first line probably isn't unique, all of the others usually are. So if your application uses 20 database tables then you will probably end up with 20 files containing a ReadTheDataAndCheckEverything() function, as well as some of the other ones.

What do people think? Am I doing something wrong or is there an easier way?
AnswerRe: Are tests ugly? Pin
Ravi Bhavnani24-Feb-10 7:22
professionalRavi Bhavnani24-Feb-10 7:22 
QuestionMessage Removed Pin
24-Feb-10 6:39
Etienne_12324-Feb-10 6:39 
AnswerRe: Recommended resolution Pin
Dave Kreskowiak24-Feb-10 8:06
mveDave Kreskowiak24-Feb-10 8:06 
QuestionultraCombo1 - Infragistics Pin
arsendem24-Feb-10 5:45
arsendem24-Feb-10 5:45 
AnswerRe: ultraCombo1 - Infragistics Pin
Saksida Bojan24-Feb-10 6:09
Saksida Bojan24-Feb-10 6:09 
QuestionRSOP Collection Com/WMI errer Pin
Planker24-Feb-10 5:44
Planker24-Feb-10 5:44 
AnswerRe: RSOP Collection Com/WMI errer Pin
Ravi Bhavnani24-Feb-10 7:24
professionalRavi Bhavnani24-Feb-10 7:24 
QuestionCustomWinFormsDesigner: How to Implement "TaskButton" on Controls and how to "Select and Draw" from a toolbox Pin
akamper24-Feb-10 4:36
akamper24-Feb-10 4:36 
AnswerRe: CustomWinFormsDesigner: How to Implement "TaskButton" on Controls and how to "Select and Draw" from a toolbox Pin
OriginalGriff24-Feb-10 4:54
mveOriginalGriff24-Feb-10 4:54 
AnswerRe: CustomWinFormsDesigner: How to Implement "TaskButton" on Controls and how to "Select and Draw" from a toolbox Pin
Saksida Bojan24-Feb-10 6:13
Saksida Bojan24-Feb-10 6:13 
GeneralRe: CustomWinFormsDesigner: How to Implement "TaskButton" on Controls and how to "Select and Draw" from a toolbox Pin
akamper24-Feb-10 20:20
akamper24-Feb-10 20:20 
GeneralRe: CustomWinFormsDesigner: How to Implement "TaskButton" on Controls and how to "Select and Draw" from a toolbox Pin
Saksida Bojan24-Feb-10 22:00
Saksida Bojan24-Feb-10 22:00 
GeneralRe: CustomWinFormsDesigner: How to Implement "TaskButton" on Controls and how to "Select and Draw" from a toolbox Pin
akamper25-Feb-10 21:15
akamper25-Feb-10 21:15 
GeneralRe: CustomWinFormsDesigner: How to Implement "TaskButton" on Controls and how to "Select and Draw" from a toolbox Pin
Saksida Bojan26-Feb-10 0:51
Saksida Bojan26-Feb-10 0:51 
QuestionIncluding Codec within installation Pin
Caio198524-Feb-10 3:33
Caio198524-Feb-10 3:33 
AnswerMessage Removed Pin
24-Feb-10 3:40
Mschauder24-Feb-10 3:40 
GeneralRe: Including Codec within installation [modified] Pin
harold aptroot24-Feb-10 3:44
harold aptroot24-Feb-10 3:44 

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.