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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:23:42+00:00 2026-05-15T08:23:42+00:00

Within one fixture is it possible to markup tests in such a way that

  • 0

Within one fixture is it possible to markup tests in such a way that the test-setup is only called for some tests and not for others?

[Test] public void TestWithoutSetup() { .. }
[Test] public void TestWithSetup() { .. }

What would I need to do make the above work?

  • 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-15T08:23:43+00:00Added an answer on May 15, 2026 at 8:23 am

    There’s no attribute to accomplish what you want.

    I would suggest refactoring your test cases into two separate classes that inherit base functionality from an abstract test class. Each test class can have its own setup method.

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

Sidebar

Related Questions

I have some code within one function that I want to separate into its
I have two projects within one solution. Both projects contain some files that are
Possible stupid question: let's say I have two apps contained within one project. Can
I have a design that uses two outer columns, and within one of the
I have an issue running some moles tests within Visual Studio 2010. Within a
Within one of my views, there is a webview that I load in a
It's easy to show some animation within one field - BitmapField or Screen: [Blackberry
I'd like some ideas about how I should test some objects that can block,
I want to assign global variable value within one function and use that variable
I have a test where I want to ensure separate operations within one page

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.