public void TestExceptionCase() { DBOperasyon d = new DBOperasyon(); d.StokListele(); try { d.kontrol = "Sandalye"; } catch (ArgumentOutOfRangeException e) { StringAssert.Contains(e.Message, "Oda id=1"); } Assert.Fail("No exception was thrown"); }