public void GetMessage()
        {
            DatabaseException e = new DatabaseException(-8);

            Assert.AreEqual("Invalid parameter", e.Message);
        }
Example #2
0
 public void TestDB_REP_NOTPERM()
 {
     testName = "TestDB_REP_NOTPERM";
     SetUpTest(false);
     DatabaseException.ThrowException(ErrorCodes.DB_REP_NOTPERM);
 }
        public void GetErrno()
        {
            DatabaseException e = new DatabaseException(13);

            Assert.AreEqual(13, e.ErrorCode);
        }
Example #4
0
 public void TestDB_REP_NEWSITE()
 {
     testName = "TestDB_REP_NEWSITE";
     SetUpTest(false);
     DatabaseException.ThrowException(ErrorCodes.DB_REP_NEWSITE);
 }
Example #5
0
 public void TestDB_REP_JOIN_FAILURE()
 {
     testName = "TestDB_REP_JOIN_FAILURE";
     SetUpTest(false);
     DatabaseException.ThrowException(ErrorCodes.DB_REP_JOIN_FAILURE);
 }
Example #6
0
 public void TestDB_REP_HOLDELECTION()
 {
     testName = "TestDB_REP_HOLDELECTION";
     SetUpTest(false);
     DatabaseException.ThrowException(ErrorCodes.DB_REP_HOLDELECTION);
 }
Example #7
0
 public void TestDB_REP_DUPMASTER()
 {
     testName = "TestDB_REP_DUPMASTER";
     SetUpTest(false);
     DatabaseException.ThrowException(ErrorCodes.DB_REP_DUPMASTER);
 }
Example #8
0
        internal static Exception MapperError(Exception innerException)
        {
            DatabaseException exception = new DatabaseException(DatabaseErrorCodes.MapperError, innerException);

            return(exception);
        }