public void Should_revert_property_on_teardown()
 {
     var concern = new TestConcern();
     Assert.That(StaticClassWithPersistentProperty.APersistentProperty, Is.EqualTo(StaticClassWithPersistentProperty.InitialPropertyValue));
     concern.SetUp();
     Assert.That(StaticClassWithPersistentProperty.APersistentProperty, Is.EqualTo(TestConcern.NewPropertyValue));
     concern.TearDown();
     Assert.That(StaticClassWithPersistentProperty.APersistentProperty, Is.EqualTo(StaticClassWithPersistentProperty.InitialPropertyValue));
 }
 public void Should_change_field_after_setup_and_revert_field_on_teardown()
 {
     var concern = new TestConcern();
     Assert.That(StaticClassWithPersistentMembers.APersistentField, Is.EqualTo(StaticClassWithPersistentMembers.InitialValue));
     concern.SetUp();
     Assert.That(StaticClassWithPersistentMembers.APersistentField, Is.EqualTo(TestConcern.NewValue));
     concern.TearDown();
     Assert.That(StaticClassWithPersistentMembers.APersistentField, Is.EqualTo(StaticClassWithPersistentMembers.InitialValue));                
 }
Example #3
0
            public void Should_change_field_after_setup_and_revert_field_on_teardown()
            {
                var concern = new TestConcern();

                Assert.That(StaticClassWithPersistentMembers.APersistentField, Is.EqualTo(StaticClassWithPersistentMembers.InitialValue));
                concern.SetUp();
                Assert.That(StaticClassWithPersistentMembers.APersistentField, Is.EqualTo(TestConcern.NewValue));
                concern.TearDown();
                Assert.That(StaticClassWithPersistentMembers.APersistentField, Is.EqualTo(StaticClassWithPersistentMembers.InitialValue));
            }
Example #4
0
            public void Should_throw_an_exception()
            {
                var concern = new TestConcern();

                Assert.Throws <TemporaryChangeNotConfiguredProperlyException>(() => concern.SetUp());
            }
 public void Should_throw_an_exception()
 {
     var concern = new TestConcern();
     Assert.Throws<TemporaryChangeNotConfiguredProperlyException>(() => concern.SetUp());                
 }