Beispiel #1
0
        public void TestCDKException_String()
        {
            string       EXPLANATION = "No, CDK cannot compute the multidollar ligand you search for target X.";
            CDKException exception   = new CDKException(EXPLANATION);

            Assert.IsNotNull(exception);
            Assert.AreEqual(EXPLANATION, exception.Message);
        }
Beispiel #2
0
        public void TestCDKException_String_Throwable()
        {
            string EXPLANATION = "No, CDK cannot compute the multidollar ligand you search for target X.";

            try
            {
                int[] array = Array.Empty <int>();
                int   dummy = array[50];
                dummy = dummy + 1;
                Assert.Fail("Should not have reached this place. The test *requires* the error to occur!");
            }
            catch (Exception exception)
            {
                CDKException cdkException = new CDKException(EXPLANATION, exception);
                Assert.IsNotNull(cdkException);
                Assert.AreEqual(EXPLANATION, cdkException.Message);
            }
        }