public void TestThatItsNotPossibleToAddTwiceTheSameInstrument() { var instrument = new Instrument("Instrument1", InstrumentType.Bond); _repository.AddInstrument(instrument); Assert.Throws <InvalidOperationException>(() => _repository.AddInstrument(instrument)); }