Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

nunit cleanup after all tests

// NUNIT 3.x
namespace MyNamespace.Tests
{
    using System;
    using NUnit.Framework;

    [SetUpFixture]
    public class TestsSetupClass
    {
        [OneTimeSetUp]
        public void GlobalSetup()
        {
            // Do login here.
        }

        [OneTimeTearDown]
        public void GlobalTeardown()
        {
            // Do logout here
        }
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #nunit #cleanup #tests
ADD COMMENT
Topic
Name
1+6 =