Click here to Skip to main content
15,911,646 members
Home / Discussions / C#
   

C#

 
GeneralRe: 3D library/engine .net Pin
LimeMan25-Feb-10 4:43
LimeMan25-Feb-10 4:43 
GeneralRe: 3D library/engine .net Pin
AspDotNetDev25-Feb-10 9:22
protectorAspDotNetDev25-Feb-10 9:22 
AnswerRe: 3D library/engine .net Pin
jimclack26-Feb-10 9:14
jimclack26-Feb-10 9:14 
GeneralRe: 3D library/engine .net Pin
LimeMan28-Feb-10 10:18
LimeMan28-Feb-10 10:18 
QuestionSQL database with C#? Pin
Iman Mohtashemi24-Feb-10 12:57
Iman Mohtashemi24-Feb-10 12:57 
AnswerRe: SQL database with C#? Pin
AspDotNetDev24-Feb-10 14:36
protectorAspDotNetDev24-Feb-10 14:36 
GeneralRe: SQL database with C#? Pin
Iman Mohtashemi24-Feb-10 15:39
Iman Mohtashemi24-Feb-10 15:39 
GeneralRe: SQL database with C#? Pin
AspDotNetDev24-Feb-10 16:56
protectorAspDotNetDev24-Feb-10 16:56 
QuestionPurpose of Clip member in Graphics Pin
baranils24-Feb-10 10:34
baranils24-Feb-10 10:34 
AnswerRe: Purpose of Clip member in Graphics Pin
Dr.Walt Fair, PE24-Feb-10 11:13
professionalDr.Walt Fair, PE24-Feb-10 11:13 
GeneralRe: Purpose of Clip member in Graphics Pin
baranils24-Feb-10 20:28
baranils24-Feb-10 20:28 
GeneralRe: Purpose of Clip member in Graphics Pin
RichardM124-Feb-10 20:38
RichardM124-Feb-10 20:38 
GeneralRe: Purpose of Clip member in Graphics Pin
baranils24-Feb-10 20:50
baranils24-Feb-10 20:50 
GeneralRe: Purpose of Clip member in Graphics Pin
Dr.Walt Fair, PE25-Feb-10 4:00
professionalDr.Walt Fair, PE25-Feb-10 4:00 
GeneralRe: Purpose of Clip member in Graphics Pin
baranils25-Feb-10 4:10
baranils25-Feb-10 4:10 
QuestionAsynchronous socket programming Pin
Frozzeg24-Feb-10 8:02
Frozzeg24-Feb-10 8:02 
AnswerRe: Asynchronous socket programming Pin
Paulo Zemek24-Feb-10 8:40
Paulo 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 

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.