Click here to Skip to main content
15,890,043 members
Home / Discussions / C#
   

C#

 
GeneralRe: use only 2 digis in simple precision Pin
Luc Pattyn14-Feb-10 6:59
sitebuilderLuc Pattyn14-Feb-10 6:59 
GeneralRe: use only 2 digis in simple precision Pin
Dan Mos14-Feb-10 7:05
Dan Mos14-Feb-10 7:05 
QuestionC# application and Facebook integration Pin
Etienne_12314-Feb-10 5:15
Etienne_12314-Feb-10 5:15 
AnswerRe: C# application and Facebook integration Pin
Abhinav S14-Feb-10 5:19
Abhinav S14-Feb-10 5:19 
QuestionMessage Removed Pin
14-Feb-10 4:49
hassan iravani14-Feb-10 4:49 
AnswerRe: Distinct Pin
Keith Barrow14-Feb-10 4:57
professionalKeith Barrow14-Feb-10 4:57 
AnswerRe: Distinct Pin
OriginalGriff14-Feb-10 4:58
mveOriginalGriff14-Feb-10 4:58 
QuestionHow do I unit test this? Pin
Member 448708314-Feb-10 4:36
Member 448708314-Feb-10 4:36 
Imagine you have the following code.

public void X()
{
  A();
  B();
  C();
  // etc...
}


Assuming that A, B, and C etc. are private function members, how would you write a unit test for this?

One way is to make them protected instead of private, but then you are changing the application code. Is there a way to do it without modifying the code above?

Visual Studio can also setup private accessors, but I think they're quite ugly. Or are they they best option?
AnswerRe: How do I unit test this? Pin
Keith Barrow14-Feb-10 4:55
professionalKeith Barrow14-Feb-10 4:55 
AnswerRe: How do I unit test this? Pin
Luc Pattyn14-Feb-10 5:03
sitebuilderLuc Pattyn14-Feb-10 5:03 
GeneralRe: How do I unit test this? [modified] Pin
Keith Barrow14-Feb-10 5:54
professionalKeith Barrow14-Feb-10 5:54 
AnswerRe: How do I unit test this? Pin
Not Active14-Feb-10 4:57
mentorNot Active14-Feb-10 4:57 
AnswerRe: How do I unit test this? Pin
Luc Pattyn14-Feb-10 5:00
sitebuilderLuc Pattyn14-Feb-10 5:00 
GeneralRe: How do I unit test this? Pin
Member 448708315-Feb-10 6:50
Member 448708315-Feb-10 6:50 
GeneralRe: How do I unit test this? Pin
Luc Pattyn15-Feb-10 11:44
sitebuilderLuc Pattyn15-Feb-10 11:44 
AnswerRe: How do I unit test this? [modified] Pin
Jimmanuel14-Feb-10 11:34
Jimmanuel14-Feb-10 11:34 
GeneralRe: How do I unit test this? Pin
Member 448708315-Feb-10 6:48
Member 448708315-Feb-10 6:48 
GeneralRe: How do I unit test this? Pin
Jimmanuel15-Feb-10 8:46
Jimmanuel15-Feb-10 8:46 
QuestionCrash inside InitializeComponent() Pin
SimpleData14-Feb-10 0:24
SimpleData14-Feb-10 0:24 
AnswerRe: Crash inside InitializeComponent() Pin
Abhinav S14-Feb-10 0:30
Abhinav S14-Feb-10 0:30 
GeneralRe: Crash inside InitializeComponent() Pin
SimpleData14-Feb-10 0:34
SimpleData14-Feb-10 0:34 
GeneralRe: Crash inside InitializeComponent() Pin
Abhinav S14-Feb-10 0:47
Abhinav S14-Feb-10 0:47 
GeneralRe: Crash inside InitializeComponent() Pin
SimpleData14-Feb-10 1:42
SimpleData14-Feb-10 1:42 
AnswerRe: Crash inside InitializeComponent() Pin
Luc Pattyn14-Feb-10 0:52
sitebuilderLuc Pattyn14-Feb-10 0:52 
GeneralRe: Crash inside InitializeComponent() Pin
SimpleData14-Feb-10 1:42
SimpleData14-Feb-10 1:42 

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.