Re: testing -- what to do for testing code with behaviour dependant upon which files exist?



On Sat, 02 Apr 2005 15:30:13 -0500, Brian van den Broek wrote:
> So, how does one handle such cases with tests?

When I had a similar situation, I created a directory for testing that was
in a known state, and tested on that. If you can test based on a relative
directory, that should work OK.

Non-existant paths shouldn't be too hard to come up with; hardcoding a
constant relative dir of
"THISDIRECTORYCANTPOSSIBLYEXISTANDIFITDOESYOURENUTS" ought to do OK.



.



Relevant Pages

  • Re: write a letter of appeal for termination of contract
    ... Stan Brown, Oak Road Systems, Tompkins County, New York, USA ... I ought to: it's ... Prev by Date: ...
    (microsoft.public.word.newusers)
  • Re: Question.
    ... I'm only assuming that those were my faxes trying to come ... I guess I ought to check on that. ... Blupencl ... Prev by Date: ...
    (sci.med.transcription)
  • Re: Is there a name for these people?
    ... > You really ought to find out what's happened before you ... > start calling them names. ... there are two possibilities and that I don't care ... Prev by Date: ...
    (uk.people.consumers.ebay)
  • Re: Remembering creator of document
    ... sharepoint-team-product, so that is why I have posted here. ... Just thought you ought to know. ... representing himself and not the company he works for. ... Prev by Date: ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: Age-old "SQL Server does not exist" error
    ... Took the words outta my mouth Lucas... ... I tried hardcoding the port as you suggested. ... Prev by Date: ...
    (microsoft.public.dotnet.framework.aspnet)