You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1>C:\Users\jan\source\repos\Nunittest\Class1.cs(9,10,9,26): warning CS0618: 'TestFixtureSetUpAttribute' is obsolete: 'Use OneTimeSetUpAttribute'
1>C:\Users\jan\source\repos\Nunittest\Class1.cs(15,10,15,29): warning CS0618: 'TestFixtureTearDownAttribute' is obsolete: 'Use OneTimeTearDownAttribute'
// pre nunit 2.6.x TestFixtureSetUp syntaxnamespaceTestProject{[TestFixture]publicclassTester{[TestFixtureSetUp]// pre 2.6.x syntaxpublicvoidTestFixtureSetUp(){
System.Console.WriteLine("C# TestFixtureSetUp");}[TestFixtureTearDown]// pre 2.6.x syntaxpublicvoidTestFixtureTearDown(){
System.Console.WriteLine("C# TestFixtureTearDown");}[Test]publicvoidMytest(){
System.Console.WriteLine("C# Mytest");}}}
// nunit 2.6.x or nunit 3.x.x replaced TestFixtureSetUp and TestFixtureTearDown// with OneTimeSetUpAttribute and OneTimeTearDownAttribute// TestFixtureSetUp and TestFixtureTearDown **are** still allowed, but reported as obsoletenamespaceTestProject{[TestFixture]publicclassTester{[OneTimeSetUpAttribute]//newpublicvoidTestFixtureSetUp(){
System.Console.WriteLine("C# TestFixtureSetUp");// not called in v1.1.5}[OneTimeTearDownAttribute]//newpublicvoidTestFixtureTearDown(){
System.Console.WriteLine("C# TestFixtureTearDown");}[Test]publicvoidMytest(){
System.Console.WriteLine("C# Mytest");}}}
The text was updated successfully, but these errors were encountered:
janwilmans
changed the title
With nunit 2.6.7 or higher
With nunit 2.6.7 or higher replaced TestFixtureSetUp and TestFixtureTearDown
Aug 9, 2018
The text was updated successfully, but these errors were encountered: