Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Product Lifecycle
  3. Collaboration / Beta Testing
  4. NUnit testing with atomicity

NUnit testing with atomicity

Scheduled Pinned Locked Moved Collaboration / Beta Testing
questiondatabasealgorithmstestingbeta-testing
1 Posts 1 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    al maze
    wrote on last edited by
    #1

    hi, have been searching around for quite a while on this but have been having trouble locating an explanation. i've read all over that unit tests need to be runnable independently from other code. this makes sense to me but my question is what to do with re-usable code? for example: i have 4 tests: CreateUserTest : i create a user object in the db DeleteUserTest: here, i want to create a user, then delete that user. so i re-use the code in the first test. CreateGroupTest: Creates a group in the db AddUserToGroupTest: this is another reusability example. here, i run the "CreateGroupTest", "CreateUserTest","AddUserToGroupTest" i can run each test individually and in any order. (which is good) is something wrong with this type of reusability? i have everything as seperate tests in one test fixture with one setup and one teardown. Any thoughts?

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups