Click here to Skip to main content
15,899,313 members
Home / Discussions / C#
   

C#

 
GeneralRe: Exception When Streaming Content Over localhost Pin
leppie9-Jul-08 1:35
leppie9-Jul-08 1:35 
GeneralRe: Exception When Streaming Content Over localhost Pin
#realJSOP9-Jul-08 9:19
professional#realJSOP9-Jul-08 9:19 
QuestionDownload mail Pin
hadad8-Jul-08 5:51
hadad8-Jul-08 5:51 
AnswerRe: Download mail Pin
User 66588-Jul-08 6:04
User 66588-Jul-08 6:04 
QuestionDTSx [modified] Pin
Paresh Gujarathi8-Jul-08 5:42
Paresh Gujarathi8-Jul-08 5:42 
QuestionWhen to test concrete classes in TDD? Pin
Pawel Krakowiak8-Jul-08 5:19
Pawel Krakowiak8-Jul-08 5:19 
AnswerRe: When to test concrete classes in TDD? Pin
N a v a n e e t h8-Jul-08 16:39
N a v a n e e t h8-Jul-08 16:39 
AnswerRe: When to test concrete classes in TDD? Pin
N a v a n e e t h8-Jul-08 16:51
N a v a n e e t h8-Jul-08 16:51 
When I re-read your post, I had a feeling that you are not using TDD. You are writing tests but it's not test driven, is it ? If you write the test case in the begining, you might have avoided this confusion.

Initially you write the test something like
[Test]
public void CanFetchUserById()
{
    UserRepository repository = new UserRepository();
    IUser user = repository.FetchUserById(1);
    Assert.That(user != NULL);
    Assert.AreEqual(user.Id,1);
    Assert.AreEqual(user.Name,"Jim");
}
Now to make this test compile, you add a skeleton "FetchById" method to "UserRepository" class.
public IUser FetchByID(int userID)
{
    throw new NotImplementedException();
}
Now your test will compile, but it will fail. Now come back to your "FetchById" method and add it's implementation. You find that it needs an external source like database to complete processing. So you mock the database access to make your test isolated.

Hope this makes it more clear.

All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia

How to use google | Ask smart questions

GeneralRe: When to test concrete classes in TDD? Pin
Pawel Krakowiak8-Jul-08 22:47
Pawel Krakowiak8-Jul-08 22:47 
Questionwebpage calling windows service Pin
adam_smith_20038-Jul-08 5:08
adam_smith_20038-Jul-08 5:08 
AnswerRe: webpage calling windows service Pin
Christian Graus8-Jul-08 5:19
protectorChristian Graus8-Jul-08 5:19 
GeneralRe: webpage calling windows service Pin
adam_smith_20038-Jul-08 5:25
adam_smith_20038-Jul-08 5:25 
GeneralRe: webpage calling windows service Pin
Christian Graus8-Jul-08 5:37
protectorChristian Graus8-Jul-08 5:37 
AnswerRe: webpage calling windows service Pin
PIEBALDconsult8-Jul-08 7:29
mvePIEBALDconsult8-Jul-08 7:29 
QuestionIdentifying CD "format" Pin
arronhuk8-Jul-08 4:49
arronhuk8-Jul-08 4:49 
Questionvarchar(50) or nvarchar(50)? Pin
mrcooll8-Jul-08 4:40
mrcooll8-Jul-08 4:40 
AnswerRe: varchar(50) or nvarchar(50)? PinPopular
Guffa8-Jul-08 4:50
Guffa8-Jul-08 4:50 
GeneralRe: varchar(50) or nvarchar(50)? Pin
Christian Graus8-Jul-08 5:18
protectorChristian Graus8-Jul-08 5:18 
JokeRe: varchar(50) or nvarchar(50)? Pin
Luc Pattyn8-Jul-08 6:10
sitebuilderLuc Pattyn8-Jul-08 6:10 
QuestionCustomizing a .NET setup dynamically Pin
orangeflow8-Jul-08 3:50
orangeflow8-Jul-08 3:50 
AnswerRe: Customizing a .NET setup dynamically Pin
Rutvik Dave8-Jul-08 8:28
professionalRutvik Dave8-Jul-08 8:28 
QuestionProblem in FontStyle property Pin
Krishnraj8-Jul-08 3:38
Krishnraj8-Jul-08 3:38 
AnswerRe: Problem in FontStyle property Pin
Luc Pattyn8-Jul-08 3:46
sitebuilderLuc Pattyn8-Jul-08 3:46 
AnswerRe: Problem in FontStyle property Pin
half-life8-Jul-08 3:51
half-life8-Jul-08 3:51 
GeneralRe: Problem in FontStyle property Pin
Krishnraj8-Jul-08 4:07
Krishnraj8-Jul-08 4:07 

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.