public void InvalidUseOfSomeImp() { // Fixture setup var something = new SomeImp(); // Exercise system and verify outcome Assert.Throws <InvalidOperationException>(() => something.Message = "Ploeh"); // Teardown }
public void ValidUseOfSomeImp() { // Fixture setup var something = new SomeImp(); // Exercise system something.Initialize(new MyClass()); something.Message = "Ploeh"; // Verify outcome Assert.Equal <string>("Ploeh", something.Message); // Teardown }
public void ValidUseOfSomeImp() { // Fixture setup var something = new SomeImp(); // Exercise system something.Initialize(new MyClass()); something.Message = "Ploeh"; // Verify outcome Assert.Equal<string>("Ploeh", something.Message); // Teardown }
public void InvalidUseOfSomeImp() { // Fixture setup var something = new SomeImp(); // Exercise system and verify outcome Assert.Throws<InvalidOperationException>(() => something.Message = "Ploeh"); // Teardown }