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 7966219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:22:05+00:00 2026-06-04T06:22:05+00:00

I have test function: [TestMethod()] public void CreateTest(string input) { string expected = 321;

  • 0

I have test function:

[TestMethod()]
public void CreateTest(string input)
{
   string expected = "321"; 
   Assert.AreEqual(expected, input);
}

I need to run this test with different data: CreateTest("321"); CreateTest("123"); CreateTest(null);
I do not know how to do this before I did something like [TestCase("123")], [TestCase("321")]

I need something that:

[RowTest]
[Row(1,1,2)]
[Row(2,1,3)]
[Row(1,-1,0)]
public void SumTest(int a1, int a2, int result)
{
    Assert.AreEqual(a1 + a2, result);
}
  • 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-06-04T06:22:07+00:00Added an answer on June 4, 2026 at 6:22 am

    Have you tried data-driven unit testing? It doesn’t use class attributes, but it should give you the same results.

    If you want to achieve high code coverage, take a look at the Pex power tool.

    If you want to model your tests (MBT), Spec Explorer is also worth review.

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

Sidebar

Related Questions

I have this (simplification): $(li).click(function{alert(test);}); <li> <input> </li> What's the best way to bind
Suppose I have a function like this: public void AddEntry(Entry entry) { if (entry.Size
I have the following express node.js app. It's using the 'redis' npm package. app.get(/test,function(req,res){
I have just come across this code: function test(){ //... if ( $profilerule ==
suppose I have a function: function test(){} test.prototype.method01=function(){ //do something } test.prototype.method02=function(){ //how can
I have the below configuration where I'm trying to create a test C function
Say I have this code in my page: <script language=javascript> $(document).ready(function() { $(.test).click(function() {
I have added some animation using jquery but it's not working: $('.test-container').click(function(){ $(this).css('background-color', 'rgb(119,
guys, I wrote a function to test if two inputs (a and b) have
I have function: char *zap(char *ar) { char pie[100] = INSERT INTO test (nazwa,

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.