daily pastebin goal
35%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     [TestFixture]
  2.     public class InheritedFixture
  3.     {
  4.         protected int _setupValue;
  5.         [SetUp]
  6.         public void ShouldNotRun()
  7.         {
  8.             _setupValue = 10;
  9.             throw new Exception("This code should not execute.");
  10.         }
  11.  
  12.         [TearDown]
  13.         public void ShouldNotRunAlso()
  14.         {
  15.             throw new Exception("This code should not execute.");
  16.         }
  17.     }
  18.  
  19.     [TestFixture]
  20.     public class SubClass : InheritedFixture
  21.     {
  22.         [SetUp]
  23.         public void ShouldRun()
  24.         {
  25.  
  26.         }
  27.  
  28.         [TearDown]
  29.         public void ShouldRunAlso()
  30.         {
  31.  
  32.         }
  33.  
  34.         [Test]
  35.         public void Should_pass()
  36.         {
  37.             Assert.AreNotEqual(10, _setupValue);
  38.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top