Click here to Skip to main content
15,902,938 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Unit testing discussion - Mock Data - Yes, No, or Yes & No? Pin
Dan Neely27-Nov-19 3:22
Dan Neely27-Nov-19 3:22 
AnswerRe: Unit testing discussion - Mock Data - Yes, No, or Yes & No? Pin
GuyThiebaut26-Nov-19 20:47
professionalGuyThiebaut26-Nov-19 20:47 
AnswerRe: Unit testing discussion - Mock Data - Yes, No, or Yes & No? Pin
RichardS26-Nov-19 21:02
RichardS26-Nov-19 21:02 
AnswerRe: Unit testing discussion - Mock Data - Yes, No, or Yes & No? Pin
Tomas Takac26-Nov-19 21:26
Tomas Takac26-Nov-19 21:26 
AnswerRe: Unit testing discussion - Mock Data - Yes, No, or Yes & No? Pin
Carl_Sharman26-Nov-19 21:41
Carl_Sharman26-Nov-19 21:41 
AnswerRe: Unit testing discussion - Mock Data - Yes, No, or Yes & No? Pin
Stuart Dootson26-Nov-19 22:58
professionalStuart Dootson26-Nov-19 22:58 
AnswerRe: Unit testing discussion - Mock Data - Yes, No, or Yes & No? Pin
#realJSOP27-Nov-19 1:11
professional#realJSOP27-Nov-19 1:11 
AnswerRe: Unit testing discussion - Mock Data - Yes, No, or Yes & No? Pin
Ed K27-Nov-19 2:31
Ed K27-Nov-19 2:31 
I think this has already been said.

By definition unit tests should be small, focused, fast and should not use external files, databases, rest.. anything like that. If you need to hit the file system create an interface and mock it. Unit tests can run on any machine without configurations, files, database connections .. They can run on DevOps or your choice of cloud with no extra configs. They just work.

Integration tests on the other hand don't have that restriction. For me it's basically a sandbox to make sure I can run that tracer thru the code correctly. Maybe figure out how to do something, benchmarks, etc. They are not run during CI/CD builds. I mark them as ignored just to be sure.

Also.. I keep them in separate assemblies just to be sure of no leaks.
ed

~"Watch your thoughts; they become your words. Watch your words they become your actions.
Watch your actions; they become your habits. Watch your habits; they become your character.
Watch your character; it becomes your destiny."
-Frank Outlaw.

AnswerRe: Unit testing discussion - Mock Data - Yes, No, or Yes & No? Pin
davecasdf27-Nov-19 4:36
davecasdf27-Nov-19 4:36 
GeneralRe: Unit testing discussion - Mock Data - Yes, No, or Yes & No? Pin
MSBassSinger27-Nov-19 6:42
professionalMSBassSinger27-Nov-19 6:42 
AnswerRe: Unit testing discussion - Mock Data - Yes, No, or Yes & No? Pin
Bruce Patin27-Nov-19 6:58
Bruce Patin27-Nov-19 6:58 
GeneralRe: Unit testing discussion - Mock Data - Yes, No, or Yes & No? Pin
MSBassSinger27-Nov-19 7:08
professionalMSBassSinger27-Nov-19 7:08 
GeneralThought of the Day Pin
OriginalGriff26-Nov-19 5:07
mveOriginalGriff26-Nov-19 5:07 
GeneralRe: Thought of the Day Pin
DRHuff26-Nov-19 5:21
DRHuff26-Nov-19 5:21 
GeneralRe: Thought of the Day Pin
Daniel Pfeffer26-Nov-19 5:40
professionalDaniel Pfeffer26-Nov-19 5:40 
GeneralRe: Thought of the Day Pin
W Balboos, GHB26-Nov-19 6:24
W Balboos, GHB26-Nov-19 6:24 
GeneralRe: Thought of the Day Pin
DRHuff26-Nov-19 9:08
DRHuff26-Nov-19 9:08 
GeneralRe: Thought of the Day Pin
jeron126-Nov-19 6:59
jeron126-Nov-19 6:59 
GeneralRe: Thought of the Day Pin
Kschuler26-Nov-19 8:20
Kschuler26-Nov-19 8:20 
GeneralRe: Thought of the Day Pin
Mike Hankey26-Nov-19 10:18
mveMike Hankey26-Nov-19 10:18 
GeneralRe: Thought of the Day Pin
swampwiz26-Nov-19 15:54
swampwiz26-Nov-19 15:54 
GeneralRe: Thought of the Day Pin
OriginalGriff26-Nov-19 20:41
mveOriginalGriff26-Nov-19 20:41 
GeneralRe: Thought of the Day Pin
OriginalGriff26-Nov-19 20:53
mveOriginalGriff26-Nov-19 20:53 
GeneralRe: Thought of the Day Pin
Herman<T>.Instance26-Nov-19 21:13
Herman<T>.Instance26-Nov-19 21:13 
GeneralRe: Thought of the Day Pin
Johnny YYZ27-Nov-19 0:40
professionalJohnny YYZ27-Nov-19 0:40 

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.