Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3609016
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:34:25+00:00 2026-05-18T21:34:25+00:00

HI, I have been assigned a task of exploring unit testing using tools available

  • 0

HI,
I have been assigned a task of exploring unit testing using tools available in the market. My question is how do i write an API that would help in writing unit test cases.
Example i can use nunit to write something like this to check whether file exists in the given location.

<Test()> _
   Public Sub CheckOutputFileInfo()
    ReportPath = "D:temp\test.txt"
    Dim result As Boolean
    result = File.Exists(ReportPath)
    Assert.IsTrue(result)
End Sub

I understand this is not the best example but my question is how do i incorporate nunit and develop an API so that other developers/testers can write test cases without bothering about to learn about nunit.
FYI I have never written an API this will be my first shot at it.
Any recommendations on where to start??
thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T21:34:25+00:00Added an answer on May 18, 2026 at 9:34 pm

    Your example isn’t strictly a unit test as it hits the file system.

    A test is not a unit test if:

    1. It talks to the database
    2. It communicates across the network
    3. It touches the file system
    4. It can’t run at the same time as any of your other unit tests
    5. You have to do special things to your environment (such as editing config files) to run it.

    I would advise you learn Unit Test best practices and patterns before starting to try to make your developers start unit testing. From experience someone needs to champion unit testing having fully grasped it themselves. It will save you a lot of headaches in the long run.

    Here is an excellent book to get you started:

    http://artofunittesting.com/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been assigned wit the task to write a program that takes a
I have been assigned the task to refactor a Delphi unit. Wow. 10000 lines
For my assignment I have been assigned the task of creating a DTD for
I have been assigned a project to develop a set of classes that act
I have been assigned a project with a lot of poorly written code that
I have no experience with SQL Server 2005. I've been assigned a task to
Part of a new product I have been assigned to work on involves server-side
My company has a web document management application and I have been assigned to
I found a bunch of scripts in the project I have been newly assigned
Have been looking at the MVC storefront and see that IQueryable is returned from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.