コード例 #1
0
            protected override void Arrange()
            {
                const string message =
                    "update or delete on table \"DependentTable\" violates foreign key constraint \"FK_MainTable_DependentTable\" on table \"MainTable\"";

                exception = NHibernateExceptionBuilder.CreatePostgresException(GenericSqlExceptionMessage, message);
            }
コード例 #2
0
            protected override void Arrange()
            {
                const string slightlyWrongMessage =
                    "inserting or updating on table \"DependentTable\" violates foreign key constraint \"FK_MainTable_DependentTable\"";

                exception = NHibernateExceptionBuilder.CreatePostgresException(GenericSqlExceptionMessage, slightlyWrongMessage);
            }
コード例 #3
0
            protected override void Arrange()
            {
                const string message =
                    "insert or update on table \"DoublePrimaryKeys\" violates foreign key constraint \"FK_DoubleDependent_DoublePrimaryKeys\"";

                exception = NHibernateExceptionBuilder.CreatePostgresException(GenericSqlExceptionMessage, message);
            }
            protected override void Arrange()
            {
                const string slightlyWrongMessage = "duplicate key value violates index constraint \"PK_UsersId\"";

                exception = NHibernateExceptionBuilder.CreatePostgresException(GenericSqlExceptionMessage, slightlyWrongMessage);
            }
            protected override void Arrange()
            {
                const string message = "duplicate key value violates unique constraint \"PK_ApplicationId\"";

                exception = NHibernateExceptionBuilder.CreatePostgresException(GenericSqlExceptionMessage, message);
            }