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

  • SEARCH
  • Home
  • 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 6746043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:16:35+00:00 2026-05-26T12:16:35+00:00

I am working on some unittest projects in VS 2008 in C#, i created

  • 0

I am working on some unittest projects in VS 2008 in C#, i created one simple small method for unit test?

public int addNumber(int a, int b)
{
    return a + b;
}

well i created a unit test method as below,

[TestMethod()]
public void addNumberTest()
{
    Mathematical target = new Mathematical(); // TODO: Initialize to an appropriate value
    int a = 4; // TODO: Initialize to an appropriate value
    int b = 2; // TODO: Initialize to an appropriate value
    int expected = 0; // TODO: Initialize to an appropriate value
    int actual;
    actual = target.addNumber(a, b);
    Assert.AreEqual(expected, actual);
    Assert.Inconclusive("Verify the correctness of this test method.");
}

But when i try to run the unittest project ,

I am receiving an Inconclusive message. My question is

  1. what exactly the Inconclusive is and when it comes into the picture?
  2. what are the necessary things, i need to do to make my unit test passed?
  • 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-26T12:16:36+00:00Added an answer on May 26, 2026 at 12:16 pm

    You need to decide what the criteria is for a unit test to be considered passed. There isn’t a blanket answer to what makes a unit test pass. The specifications ultimately dictate what constitutes a passing unit test.

    If the method you are testing is indeed just adding two numbers, than the Assert.AreEqual(expected,actual) is probably enough for this particular unit test. You may also want to check Assert.IsTrue(expected>0) That may be another assertion you could tack on to this unit test.

    You’ll want to test it again though with other values like negatives, zeros, and really large numbers.

    You won’t need the Inconclusive operator for your unit tests of the addNumber method. That assertion would be more useful when dealing with objects and threads possibly. Calling the Inconclusive assertion like you have will always fail and always return the string passed into it.

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

Sidebar

Related Questions

I'm writing a unit test for some simple methods. The issue I am having
Has any one some example code of mocking request.form in a unit test, calling
When working with some open source projects (in my case Joomla and Moodle), I've
I'm starting to write some unit test for my javascript code using qunit and
currently I am working on a spring based application. I do have some unit
I'm looking to unit test some SWT and Swing code for a project I'm
I'm working on writing a non-trivial unit test (perhaps better called a UI test?).
I'm attempting to do some simple mocking of a Domain class within a unit
I am working on a series of unit tests in Python, some of which
I've researched some information about techniques I could use to unit test a DbContext

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.