tavern/errors/errors_generated_test.go

8587 lines
337 KiB
Go

// Code generated by go generate; DO NOT EDIT.
// This file was generated by herr at 2020-04-05 12:40:16.85622214 -0400 EDT m=+0.040733718
package errors
import (
"fmt"
"testing"
"errors"
)
func TestNotFound (t *testing.T) {
err1 := NewNotFoundError(nil)
{
err1, ok := err1.(NotFoundError)
if !ok {
t.Errorf("Assertion failed on NotFound: %T is not NotFoundError", err1)
}
if err1.Prefix() != "TAV" {
t.Errorf("Assertion failed on NotFound: %s != TAV", err1.Prefix())
}
if err1.Code() != 1 {
t.Errorf("Assertion failed on NotFound: %d != 1", err1.Code())
}
if err1.Description() != "Not found." {
t.Errorf("Assertion failed on NotFound: %s != Not found.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewNotFoundError(errThingNotFound)
{
err2, ok := err2.(NotFoundError)
if !ok {
t.Errorf("Assertion failed on NotFound: %T is not NotFoundError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 1 {
t.Errorf("Assertion failed on NotFound: %d != 1", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on NotFound: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on NotFound: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, NotFoundError{}) {
t.Errorf("Assertion failed on NotFound: NotFoundError{} not identified correctly")
}
if !errors.Is(errNestErr2, NotFoundError{}) {
t.Errorf("Assertion failed on NotFound: NotFoundError{} not identified correctly")
}
}
}
func TestEncryptFailed (t *testing.T) {
err1 := NewEncryptFailedError(nil)
{
err1, ok := err1.(EncryptFailedError)
if !ok {
t.Errorf("Assertion failed on EncryptFailed: %T is not EncryptFailedError", err1)
}
if err1.Prefix() != "TAV" {
t.Errorf("Assertion failed on EncryptFailed: %s != TAV", err1.Prefix())
}
if err1.Code() != 2 {
t.Errorf("Assertion failed on EncryptFailed: %d != 2", err1.Code())
}
if err1.Description() != "Encrypting data failed." {
t.Errorf("Assertion failed on EncryptFailed: %s != Encrypting data failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewEncryptFailedError(errThingNotFound)
{
err2, ok := err2.(EncryptFailedError)
if !ok {
t.Errorf("Assertion failed on EncryptFailed: %T is not EncryptFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 2 {
t.Errorf("Assertion failed on EncryptFailed: %d != 2", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on EncryptFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on EncryptFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, EncryptFailedError{}) {
t.Errorf("Assertion failed on EncryptFailed: EncryptFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, EncryptFailedError{}) {
t.Errorf("Assertion failed on EncryptFailed: EncryptFailedError{} not identified correctly")
}
}
}
func TestDecryptFailed (t *testing.T) {
err1 := NewDecryptFailedError(nil)
{
err1, ok := err1.(DecryptFailedError)
if !ok {
t.Errorf("Assertion failed on DecryptFailed: %T is not DecryptFailedError", err1)
}
if err1.Prefix() != "TAV" {
t.Errorf("Assertion failed on DecryptFailed: %s != TAV", err1.Prefix())
}
if err1.Code() != 3 {
t.Errorf("Assertion failed on DecryptFailed: %d != 3", err1.Code())
}
if err1.Description() != "Decrypting data failed." {
t.Errorf("Assertion failed on DecryptFailed: %s != Decrypting data failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewDecryptFailedError(errThingNotFound)
{
err2, ok := err2.(DecryptFailedError)
if !ok {
t.Errorf("Assertion failed on DecryptFailed: %T is not DecryptFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 3 {
t.Errorf("Assertion failed on DecryptFailed: %d != 3", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on DecryptFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on DecryptFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, DecryptFailedError{}) {
t.Errorf("Assertion failed on DecryptFailed: DecryptFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, DecryptFailedError{}) {
t.Errorf("Assertion failed on DecryptFailed: DecryptFailedError{} not identified correctly")
}
}
}
func TestQueryFailed (t *testing.T) {
err1 := NewQueryFailedError(nil)
{
err1, ok := err1.(QueryFailedError)
if !ok {
t.Errorf("Assertion failed on QueryFailed: %T is not QueryFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on QueryFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 1 {
t.Errorf("Assertion failed on QueryFailed: %d != 1", err1.Code())
}
if err1.Description() != "The query operation failed." {
t.Errorf("Assertion failed on QueryFailed: %s != The query operation failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewQueryFailedError(errThingNotFound)
{
err2, ok := err2.(QueryFailedError)
if !ok {
t.Errorf("Assertion failed on QueryFailed: %T is not QueryFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 1 {
t.Errorf("Assertion failed on QueryFailed: %d != 1", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on QueryFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on QueryFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on QueryFailed: QueryFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, QueryFailedError{}) {
t.Errorf("Assertion failed on QueryFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestDatabaseTransactionFailed (t *testing.T) {
err1 := NewDatabaseTransactionFailedError(nil)
{
err1, ok := err1.(DatabaseTransactionFailedError)
if !ok {
t.Errorf("Assertion failed on DatabaseTransactionFailed: %T is not DatabaseTransactionFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on DatabaseTransactionFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 2 {
t.Errorf("Assertion failed on DatabaseTransactionFailed: %d != 2", err1.Code())
}
if err1.Description() != "The database transaction failed." {
t.Errorf("Assertion failed on DatabaseTransactionFailed: %s != The database transaction failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewDatabaseTransactionFailedError(errThingNotFound)
{
err2, ok := err2.(DatabaseTransactionFailedError)
if !ok {
t.Errorf("Assertion failed on DatabaseTransactionFailed: %T is not DatabaseTransactionFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 2 {
t.Errorf("Assertion failed on DatabaseTransactionFailed: %d != 2", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on DatabaseTransactionFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on DatabaseTransactionFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, DatabaseTransactionFailedError{}) {
t.Errorf("Assertion failed on DatabaseTransactionFailed: DatabaseTransactionFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, DatabaseTransactionFailedError{}) {
t.Errorf("Assertion failed on DatabaseTransactionFailed: DatabaseTransactionFailedError{} not identified correctly")
}
}
}
func TestInsertQueryFailed (t *testing.T) {
err1 := NewInsertQueryFailedError(nil)
{
err1, ok := err1.(InsertQueryFailedError)
if !ok {
t.Errorf("Assertion failed on InsertQueryFailed: %T is not InsertQueryFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on InsertQueryFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 3 {
t.Errorf("Assertion failed on InsertQueryFailed: %d != 3", err1.Code())
}
if err1.Description() != "The insert query failed" {
t.Errorf("Assertion failed on InsertQueryFailed: %s != The insert query failed", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewInsertQueryFailedError(errThingNotFound)
{
err2, ok := err2.(InsertQueryFailedError)
if !ok {
t.Errorf("Assertion failed on InsertQueryFailed: %T is not InsertQueryFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 3 {
t.Errorf("Assertion failed on InsertQueryFailed: %d != 3", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on InsertQueryFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on InsertQueryFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, InsertQueryFailedError{}) {
t.Errorf("Assertion failed on InsertQueryFailed: InsertQueryFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, InsertQueryFailedError{}) {
t.Errorf("Assertion failed on InsertQueryFailed: InsertQueryFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on InsertQueryFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestSelectQueryFailed (t *testing.T) {
err1 := NewSelectQueryFailedError(nil)
{
err1, ok := err1.(SelectQueryFailedError)
if !ok {
t.Errorf("Assertion failed on SelectQueryFailed: %T is not SelectQueryFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on SelectQueryFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 4 {
t.Errorf("Assertion failed on SelectQueryFailed: %d != 4", err1.Code())
}
if err1.Description() != "The select query failed" {
t.Errorf("Assertion failed on SelectQueryFailed: %s != The select query failed", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewSelectQueryFailedError(errThingNotFound)
{
err2, ok := err2.(SelectQueryFailedError)
if !ok {
t.Errorf("Assertion failed on SelectQueryFailed: %T is not SelectQueryFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 4 {
t.Errorf("Assertion failed on SelectQueryFailed: %d != 4", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on SelectQueryFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on SelectQueryFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, SelectQueryFailedError{}) {
t.Errorf("Assertion failed on SelectQueryFailed: SelectQueryFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, SelectQueryFailedError{}) {
t.Errorf("Assertion failed on SelectQueryFailed: SelectQueryFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on SelectQueryFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestUpdateQueryFailed (t *testing.T) {
err1 := NewUpdateQueryFailedError(nil)
{
err1, ok := err1.(UpdateQueryFailedError)
if !ok {
t.Errorf("Assertion failed on UpdateQueryFailed: %T is not UpdateQueryFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on UpdateQueryFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 5 {
t.Errorf("Assertion failed on UpdateQueryFailed: %d != 5", err1.Code())
}
if err1.Description() != "The update query failed" {
t.Errorf("Assertion failed on UpdateQueryFailed: %s != The update query failed", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewUpdateQueryFailedError(errThingNotFound)
{
err2, ok := err2.(UpdateQueryFailedError)
if !ok {
t.Errorf("Assertion failed on UpdateQueryFailed: %T is not UpdateQueryFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 5 {
t.Errorf("Assertion failed on UpdateQueryFailed: %d != 5", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on UpdateQueryFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on UpdateQueryFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, UpdateQueryFailedError{}) {
t.Errorf("Assertion failed on UpdateQueryFailed: UpdateQueryFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, UpdateQueryFailedError{}) {
t.Errorf("Assertion failed on UpdateQueryFailed: UpdateQueryFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on UpdateQueryFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestDeleteQueryFailed (t *testing.T) {
err1 := NewDeleteQueryFailedError(nil)
{
err1, ok := err1.(DeleteQueryFailedError)
if !ok {
t.Errorf("Assertion failed on DeleteQueryFailed: %T is not DeleteQueryFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on DeleteQueryFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 6 {
t.Errorf("Assertion failed on DeleteQueryFailed: %d != 6", err1.Code())
}
if err1.Description() != "The delete query failed" {
t.Errorf("Assertion failed on DeleteQueryFailed: %s != The delete query failed", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewDeleteQueryFailedError(errThingNotFound)
{
err2, ok := err2.(DeleteQueryFailedError)
if !ok {
t.Errorf("Assertion failed on DeleteQueryFailed: %T is not DeleteQueryFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 6 {
t.Errorf("Assertion failed on DeleteQueryFailed: %d != 6", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on DeleteQueryFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on DeleteQueryFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, DeleteQueryFailedError{}) {
t.Errorf("Assertion failed on DeleteQueryFailed: DeleteQueryFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, DeleteQueryFailedError{}) {
t.Errorf("Assertion failed on DeleteQueryFailed: DeleteQueryFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on DeleteQueryFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestUserQueryFailed (t *testing.T) {
err1 := NewUserQueryFailedError(nil)
{
err1, ok := err1.(UserQueryFailedError)
if !ok {
t.Errorf("Assertion failed on UserQueryFailed: %T is not UserQueryFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on UserQueryFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 7 {
t.Errorf("Assertion failed on UserQueryFailed: %d != 7", err1.Code())
}
if err1.Description() != "The user query failed." {
t.Errorf("Assertion failed on UserQueryFailed: %s != The user query failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewUserQueryFailedError(errThingNotFound)
{
err2, ok := err2.(UserQueryFailedError)
if !ok {
t.Errorf("Assertion failed on UserQueryFailed: %T is not UserQueryFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 7 {
t.Errorf("Assertion failed on UserQueryFailed: %d != 7", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on UserQueryFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on UserQueryFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, UserQueryFailedError{}) {
t.Errorf("Assertion failed on UserQueryFailed: UserQueryFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, UserQueryFailedError{}) {
t.Errorf("Assertion failed on UserQueryFailed: UserQueryFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on UserQueryFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestUserSelectFailed (t *testing.T) {
err1 := NewUserSelectFailedError(nil)
{
err1, ok := err1.(UserSelectFailedError)
if !ok {
t.Errorf("Assertion failed on UserSelectFailed: %T is not UserSelectFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on UserSelectFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 8 {
t.Errorf("Assertion failed on UserSelectFailed: %d != 8", err1.Code())
}
if err1.Description() != "The select record operation for user failed." {
t.Errorf("Assertion failed on UserSelectFailed: %s != The select record operation for user failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewUserSelectFailedError(errThingNotFound)
{
err2, ok := err2.(UserSelectFailedError)
if !ok {
t.Errorf("Assertion failed on UserSelectFailed: %T is not UserSelectFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 8 {
t.Errorf("Assertion failed on UserSelectFailed: %d != 8", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on UserSelectFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on UserSelectFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, UserSelectFailedError{}) {
t.Errorf("Assertion failed on UserSelectFailed: UserSelectFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, UserSelectFailedError{}) {
t.Errorf("Assertion failed on UserSelectFailed: UserSelectFailedError{} not identified correctly")
}
if !errors.Is(err2, SelectQueryFailedError{}) {
t.Errorf("Assertion failed on UserSelectFailed: SelectQueryFailedError{} not identified correctly")
}
}
}
func TestUserInsertFailed (t *testing.T) {
err1 := NewUserInsertFailedError(nil)
{
err1, ok := err1.(UserInsertFailedError)
if !ok {
t.Errorf("Assertion failed on UserInsertFailed: %T is not UserInsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on UserInsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 9 {
t.Errorf("Assertion failed on UserInsertFailed: %d != 9", err1.Code())
}
if err1.Description() != "The insert record operation for user failed." {
t.Errorf("Assertion failed on UserInsertFailed: %s != The insert record operation for user failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewUserInsertFailedError(errThingNotFound)
{
err2, ok := err2.(UserInsertFailedError)
if !ok {
t.Errorf("Assertion failed on UserInsertFailed: %T is not UserInsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 9 {
t.Errorf("Assertion failed on UserInsertFailed: %d != 9", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on UserInsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on UserInsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, UserInsertFailedError{}) {
t.Errorf("Assertion failed on UserInsertFailed: UserInsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, UserInsertFailedError{}) {
t.Errorf("Assertion failed on UserInsertFailed: UserInsertFailedError{} not identified correctly")
}
if !errors.Is(err2, InsertQueryFailedError{}) {
t.Errorf("Assertion failed on UserInsertFailed: InsertQueryFailedError{} not identified correctly")
}
}
}
func TestUserUpsertFailed (t *testing.T) {
err1 := NewUserUpsertFailedError(nil)
{
err1, ok := err1.(UserUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on UserUpsertFailed: %T is not UserUpsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on UserUpsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 10 {
t.Errorf("Assertion failed on UserUpsertFailed: %d != 10", err1.Code())
}
if err1.Description() != "The upsert record operation for user failed." {
t.Errorf("Assertion failed on UserUpsertFailed: %s != The upsert record operation for user failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewUserUpsertFailedError(errThingNotFound)
{
err2, ok := err2.(UserUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on UserUpsertFailed: %T is not UserUpsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 10 {
t.Errorf("Assertion failed on UserUpsertFailed: %d != 10", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on UserUpsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on UserUpsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, UserUpsertFailedError{}) {
t.Errorf("Assertion failed on UserUpsertFailed: UserUpsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, UserUpsertFailedError{}) {
t.Errorf("Assertion failed on UserUpsertFailed: UserUpsertFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on UserUpsertFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestUserUpdateFailed (t *testing.T) {
err1 := NewUserUpdateFailedError(nil)
{
err1, ok := err1.(UserUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on UserUpdateFailed: %T is not UserUpdateFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on UserUpdateFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 11 {
t.Errorf("Assertion failed on UserUpdateFailed: %d != 11", err1.Code())
}
if err1.Description() != "The update record operation for user failed." {
t.Errorf("Assertion failed on UserUpdateFailed: %s != The update record operation for user failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewUserUpdateFailedError(errThingNotFound)
{
err2, ok := err2.(UserUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on UserUpdateFailed: %T is not UserUpdateFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 11 {
t.Errorf("Assertion failed on UserUpdateFailed: %d != 11", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on UserUpdateFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on UserUpdateFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, UserUpdateFailedError{}) {
t.Errorf("Assertion failed on UserUpdateFailed: UserUpdateFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, UserUpdateFailedError{}) {
t.Errorf("Assertion failed on UserUpdateFailed: UserUpdateFailedError{} not identified correctly")
}
if !errors.Is(err2, UpdateQueryFailedError{}) {
t.Errorf("Assertion failed on UserUpdateFailed: UpdateQueryFailedError{} not identified correctly")
}
}
}
func TestUserDeleteFailed (t *testing.T) {
err1 := NewUserDeleteFailedError(nil)
{
err1, ok := err1.(UserDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on UserDeleteFailed: %T is not UserDeleteFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on UserDeleteFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 12 {
t.Errorf("Assertion failed on UserDeleteFailed: %d != 12", err1.Code())
}
if err1.Description() != "The delete record operation for user failed." {
t.Errorf("Assertion failed on UserDeleteFailed: %s != The delete record operation for user failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewUserDeleteFailedError(errThingNotFound)
{
err2, ok := err2.(UserDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on UserDeleteFailed: %T is not UserDeleteFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 12 {
t.Errorf("Assertion failed on UserDeleteFailed: %d != 12", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on UserDeleteFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on UserDeleteFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, UserDeleteFailedError{}) {
t.Errorf("Assertion failed on UserDeleteFailed: UserDeleteFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, UserDeleteFailedError{}) {
t.Errorf("Assertion failed on UserDeleteFailed: UserDeleteFailedError{} not identified correctly")
}
if !errors.Is(err2, DeleteQueryFailedError{}) {
t.Errorf("Assertion failed on UserDeleteFailed: DeleteQueryFailedError{} not identified correctly")
}
}
}
func TestInvalidUser (t *testing.T) {
err1 := NewInvalidUserError(nil)
{
err1, ok := err1.(InvalidUserError)
if !ok {
t.Errorf("Assertion failed on InvalidUser: %T is not InvalidUserError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on InvalidUser: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 13 {
t.Errorf("Assertion failed on InvalidUser: %d != 13", err1.Code())
}
if err1.Description() != "The user is invalid." {
t.Errorf("Assertion failed on InvalidUser: %s != The user is invalid.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewInvalidUserError(errThingNotFound)
{
err2, ok := err2.(InvalidUserError)
if !ok {
t.Errorf("Assertion failed on InvalidUser: %T is not InvalidUserError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 13 {
t.Errorf("Assertion failed on InvalidUser: %d != 13", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on InvalidUser: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on InvalidUser: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, InvalidUserError{}) {
t.Errorf("Assertion failed on InvalidUser: InvalidUserError{} not identified correctly")
}
if !errors.Is(errNestErr2, InvalidUserError{}) {
t.Errorf("Assertion failed on InvalidUser: InvalidUserError{} not identified correctly")
}
}
}
func TestUserNotFound (t *testing.T) {
err1 := NewUserNotFoundError(nil)
{
err1, ok := err1.(UserNotFoundError)
if !ok {
t.Errorf("Assertion failed on UserNotFound: %T is not UserNotFoundError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on UserNotFound: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 14 {
t.Errorf("Assertion failed on UserNotFound: %d != 14", err1.Code())
}
if err1.Description() != "The user was not found." {
t.Errorf("Assertion failed on UserNotFound: %s != The user was not found.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewUserNotFoundError(errThingNotFound)
{
err2, ok := err2.(UserNotFoundError)
if !ok {
t.Errorf("Assertion failed on UserNotFound: %T is not UserNotFoundError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 14 {
t.Errorf("Assertion failed on UserNotFound: %d != 14", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on UserNotFound: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on UserNotFound: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, UserNotFoundError{}) {
t.Errorf("Assertion failed on UserNotFound: UserNotFoundError{} not identified correctly")
}
if !errors.Is(errNestErr2, UserNotFoundError{}) {
t.Errorf("Assertion failed on UserNotFound: UserNotFoundError{} not identified correctly")
}
if !errors.Is(err2, NotFoundError{}) {
t.Errorf("Assertion failed on UserNotFound: NotFoundError{} not identified correctly")
}
}
}
func TestUserSessionQueryFailed (t *testing.T) {
err1 := NewUserSessionQueryFailedError(nil)
{
err1, ok := err1.(UserSessionQueryFailedError)
if !ok {
t.Errorf("Assertion failed on UserSessionQueryFailed: %T is not UserSessionQueryFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on UserSessionQueryFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 15 {
t.Errorf("Assertion failed on UserSessionQueryFailed: %d != 15", err1.Code())
}
if err1.Description() != "The user session query failed." {
t.Errorf("Assertion failed on UserSessionQueryFailed: %s != The user session query failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewUserSessionQueryFailedError(errThingNotFound)
{
err2, ok := err2.(UserSessionQueryFailedError)
if !ok {
t.Errorf("Assertion failed on UserSessionQueryFailed: %T is not UserSessionQueryFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 15 {
t.Errorf("Assertion failed on UserSessionQueryFailed: %d != 15", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on UserSessionQueryFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on UserSessionQueryFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, UserSessionQueryFailedError{}) {
t.Errorf("Assertion failed on UserSessionQueryFailed: UserSessionQueryFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, UserSessionQueryFailedError{}) {
t.Errorf("Assertion failed on UserSessionQueryFailed: UserSessionQueryFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on UserSessionQueryFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestUserSessionSelectFailed (t *testing.T) {
err1 := NewUserSessionSelectFailedError(nil)
{
err1, ok := err1.(UserSessionSelectFailedError)
if !ok {
t.Errorf("Assertion failed on UserSessionSelectFailed: %T is not UserSessionSelectFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on UserSessionSelectFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 16 {
t.Errorf("Assertion failed on UserSessionSelectFailed: %d != 16", err1.Code())
}
if err1.Description() != "The select record operation for user session failed." {
t.Errorf("Assertion failed on UserSessionSelectFailed: %s != The select record operation for user session failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewUserSessionSelectFailedError(errThingNotFound)
{
err2, ok := err2.(UserSessionSelectFailedError)
if !ok {
t.Errorf("Assertion failed on UserSessionSelectFailed: %T is not UserSessionSelectFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 16 {
t.Errorf("Assertion failed on UserSessionSelectFailed: %d != 16", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on UserSessionSelectFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on UserSessionSelectFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, UserSessionSelectFailedError{}) {
t.Errorf("Assertion failed on UserSessionSelectFailed: UserSessionSelectFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, UserSessionSelectFailedError{}) {
t.Errorf("Assertion failed on UserSessionSelectFailed: UserSessionSelectFailedError{} not identified correctly")
}
if !errors.Is(err2, SelectQueryFailedError{}) {
t.Errorf("Assertion failed on UserSessionSelectFailed: SelectQueryFailedError{} not identified correctly")
}
}
}
func TestUserSessionInsertFailed (t *testing.T) {
err1 := NewUserSessionInsertFailedError(nil)
{
err1, ok := err1.(UserSessionInsertFailedError)
if !ok {
t.Errorf("Assertion failed on UserSessionInsertFailed: %T is not UserSessionInsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on UserSessionInsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 17 {
t.Errorf("Assertion failed on UserSessionInsertFailed: %d != 17", err1.Code())
}
if err1.Description() != "The insert record operation for user session failed." {
t.Errorf("Assertion failed on UserSessionInsertFailed: %s != The insert record operation for user session failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewUserSessionInsertFailedError(errThingNotFound)
{
err2, ok := err2.(UserSessionInsertFailedError)
if !ok {
t.Errorf("Assertion failed on UserSessionInsertFailed: %T is not UserSessionInsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 17 {
t.Errorf("Assertion failed on UserSessionInsertFailed: %d != 17", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on UserSessionInsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on UserSessionInsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, UserSessionInsertFailedError{}) {
t.Errorf("Assertion failed on UserSessionInsertFailed: UserSessionInsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, UserSessionInsertFailedError{}) {
t.Errorf("Assertion failed on UserSessionInsertFailed: UserSessionInsertFailedError{} not identified correctly")
}
if !errors.Is(err2, InsertQueryFailedError{}) {
t.Errorf("Assertion failed on UserSessionInsertFailed: InsertQueryFailedError{} not identified correctly")
}
}
}
func TestUserSessionUpsertFailed (t *testing.T) {
err1 := NewUserSessionUpsertFailedError(nil)
{
err1, ok := err1.(UserSessionUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on UserSessionUpsertFailed: %T is not UserSessionUpsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on UserSessionUpsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 18 {
t.Errorf("Assertion failed on UserSessionUpsertFailed: %d != 18", err1.Code())
}
if err1.Description() != "The upsert record operation for user session failed." {
t.Errorf("Assertion failed on UserSessionUpsertFailed: %s != The upsert record operation for user session failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewUserSessionUpsertFailedError(errThingNotFound)
{
err2, ok := err2.(UserSessionUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on UserSessionUpsertFailed: %T is not UserSessionUpsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 18 {
t.Errorf("Assertion failed on UserSessionUpsertFailed: %d != 18", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on UserSessionUpsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on UserSessionUpsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, UserSessionUpsertFailedError{}) {
t.Errorf("Assertion failed on UserSessionUpsertFailed: UserSessionUpsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, UserSessionUpsertFailedError{}) {
t.Errorf("Assertion failed on UserSessionUpsertFailed: UserSessionUpsertFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on UserSessionUpsertFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestUserSessionUpdateFailed (t *testing.T) {
err1 := NewUserSessionUpdateFailedError(nil)
{
err1, ok := err1.(UserSessionUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on UserSessionUpdateFailed: %T is not UserSessionUpdateFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on UserSessionUpdateFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 19 {
t.Errorf("Assertion failed on UserSessionUpdateFailed: %d != 19", err1.Code())
}
if err1.Description() != "The update record operation for user session failed." {
t.Errorf("Assertion failed on UserSessionUpdateFailed: %s != The update record operation for user session failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewUserSessionUpdateFailedError(errThingNotFound)
{
err2, ok := err2.(UserSessionUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on UserSessionUpdateFailed: %T is not UserSessionUpdateFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 19 {
t.Errorf("Assertion failed on UserSessionUpdateFailed: %d != 19", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on UserSessionUpdateFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on UserSessionUpdateFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, UserSessionUpdateFailedError{}) {
t.Errorf("Assertion failed on UserSessionUpdateFailed: UserSessionUpdateFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, UserSessionUpdateFailedError{}) {
t.Errorf("Assertion failed on UserSessionUpdateFailed: UserSessionUpdateFailedError{} not identified correctly")
}
if !errors.Is(err2, UpdateQueryFailedError{}) {
t.Errorf("Assertion failed on UserSessionUpdateFailed: UpdateQueryFailedError{} not identified correctly")
}
}
}
func TestUserSessionDeleteFailed (t *testing.T) {
err1 := NewUserSessionDeleteFailedError(nil)
{
err1, ok := err1.(UserSessionDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on UserSessionDeleteFailed: %T is not UserSessionDeleteFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on UserSessionDeleteFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 20 {
t.Errorf("Assertion failed on UserSessionDeleteFailed: %d != 20", err1.Code())
}
if err1.Description() != "The delete record operation for user session failed." {
t.Errorf("Assertion failed on UserSessionDeleteFailed: %s != The delete record operation for user session failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewUserSessionDeleteFailedError(errThingNotFound)
{
err2, ok := err2.(UserSessionDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on UserSessionDeleteFailed: %T is not UserSessionDeleteFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 20 {
t.Errorf("Assertion failed on UserSessionDeleteFailed: %d != 20", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on UserSessionDeleteFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on UserSessionDeleteFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, UserSessionDeleteFailedError{}) {
t.Errorf("Assertion failed on UserSessionDeleteFailed: UserSessionDeleteFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, UserSessionDeleteFailedError{}) {
t.Errorf("Assertion failed on UserSessionDeleteFailed: UserSessionDeleteFailedError{} not identified correctly")
}
if !errors.Is(err2, DeleteQueryFailedError{}) {
t.Errorf("Assertion failed on UserSessionDeleteFailed: DeleteQueryFailedError{} not identified correctly")
}
}
}
func TestInvalidUserSession (t *testing.T) {
err1 := NewInvalidUserSessionError(nil)
{
err1, ok := err1.(InvalidUserSessionError)
if !ok {
t.Errorf("Assertion failed on InvalidUserSession: %T is not InvalidUserSessionError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on InvalidUserSession: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 21 {
t.Errorf("Assertion failed on InvalidUserSession: %d != 21", err1.Code())
}
if err1.Description() != "The user session is invalid." {
t.Errorf("Assertion failed on InvalidUserSession: %s != The user session is invalid.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewInvalidUserSessionError(errThingNotFound)
{
err2, ok := err2.(InvalidUserSessionError)
if !ok {
t.Errorf("Assertion failed on InvalidUserSession: %T is not InvalidUserSessionError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 21 {
t.Errorf("Assertion failed on InvalidUserSession: %d != 21", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on InvalidUserSession: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on InvalidUserSession: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, InvalidUserSessionError{}) {
t.Errorf("Assertion failed on InvalidUserSession: InvalidUserSessionError{} not identified correctly")
}
if !errors.Is(errNestErr2, InvalidUserSessionError{}) {
t.Errorf("Assertion failed on InvalidUserSession: InvalidUserSessionError{} not identified correctly")
}
}
}
func TestUserSessionNotFound (t *testing.T) {
err1 := NewUserSessionNotFoundError(nil)
{
err1, ok := err1.(UserSessionNotFoundError)
if !ok {
t.Errorf("Assertion failed on UserSessionNotFound: %T is not UserSessionNotFoundError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on UserSessionNotFound: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 22 {
t.Errorf("Assertion failed on UserSessionNotFound: %d != 22", err1.Code())
}
if err1.Description() != "The user session was not found." {
t.Errorf("Assertion failed on UserSessionNotFound: %s != The user session was not found.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewUserSessionNotFoundError(errThingNotFound)
{
err2, ok := err2.(UserSessionNotFoundError)
if !ok {
t.Errorf("Assertion failed on UserSessionNotFound: %T is not UserSessionNotFoundError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 22 {
t.Errorf("Assertion failed on UserSessionNotFound: %d != 22", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on UserSessionNotFound: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on UserSessionNotFound: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, UserSessionNotFoundError{}) {
t.Errorf("Assertion failed on UserSessionNotFound: UserSessionNotFoundError{} not identified correctly")
}
if !errors.Is(errNestErr2, UserSessionNotFoundError{}) {
t.Errorf("Assertion failed on UserSessionNotFound: UserSessionNotFoundError{} not identified correctly")
}
if !errors.Is(err2, NotFoundError{}) {
t.Errorf("Assertion failed on UserSessionNotFound: NotFoundError{} not identified correctly")
}
}
}
func TestUserFeedQueryFailed (t *testing.T) {
err1 := NewUserFeedQueryFailedError(nil)
{
err1, ok := err1.(UserFeedQueryFailedError)
if !ok {
t.Errorf("Assertion failed on UserFeedQueryFailed: %T is not UserFeedQueryFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on UserFeedQueryFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 23 {
t.Errorf("Assertion failed on UserFeedQueryFailed: %d != 23", err1.Code())
}
if err1.Description() != "The user feed query failed." {
t.Errorf("Assertion failed on UserFeedQueryFailed: %s != The user feed query failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewUserFeedQueryFailedError(errThingNotFound)
{
err2, ok := err2.(UserFeedQueryFailedError)
if !ok {
t.Errorf("Assertion failed on UserFeedQueryFailed: %T is not UserFeedQueryFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 23 {
t.Errorf("Assertion failed on UserFeedQueryFailed: %d != 23", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on UserFeedQueryFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on UserFeedQueryFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, UserFeedQueryFailedError{}) {
t.Errorf("Assertion failed on UserFeedQueryFailed: UserFeedQueryFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, UserFeedQueryFailedError{}) {
t.Errorf("Assertion failed on UserFeedQueryFailed: UserFeedQueryFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on UserFeedQueryFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestUserFeedSelectFailed (t *testing.T) {
err1 := NewUserFeedSelectFailedError(nil)
{
err1, ok := err1.(UserFeedSelectFailedError)
if !ok {
t.Errorf("Assertion failed on UserFeedSelectFailed: %T is not UserFeedSelectFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on UserFeedSelectFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 24 {
t.Errorf("Assertion failed on UserFeedSelectFailed: %d != 24", err1.Code())
}
if err1.Description() != "The select record operation for user feed failed." {
t.Errorf("Assertion failed on UserFeedSelectFailed: %s != The select record operation for user feed failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewUserFeedSelectFailedError(errThingNotFound)
{
err2, ok := err2.(UserFeedSelectFailedError)
if !ok {
t.Errorf("Assertion failed on UserFeedSelectFailed: %T is not UserFeedSelectFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 24 {
t.Errorf("Assertion failed on UserFeedSelectFailed: %d != 24", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on UserFeedSelectFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on UserFeedSelectFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, UserFeedSelectFailedError{}) {
t.Errorf("Assertion failed on UserFeedSelectFailed: UserFeedSelectFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, UserFeedSelectFailedError{}) {
t.Errorf("Assertion failed on UserFeedSelectFailed: UserFeedSelectFailedError{} not identified correctly")
}
if !errors.Is(err2, SelectQueryFailedError{}) {
t.Errorf("Assertion failed on UserFeedSelectFailed: SelectQueryFailedError{} not identified correctly")
}
}
}
func TestUserFeedInsertFailed (t *testing.T) {
err1 := NewUserFeedInsertFailedError(nil)
{
err1, ok := err1.(UserFeedInsertFailedError)
if !ok {
t.Errorf("Assertion failed on UserFeedInsertFailed: %T is not UserFeedInsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on UserFeedInsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 25 {
t.Errorf("Assertion failed on UserFeedInsertFailed: %d != 25", err1.Code())
}
if err1.Description() != "The insert record operation for user feed failed." {
t.Errorf("Assertion failed on UserFeedInsertFailed: %s != The insert record operation for user feed failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewUserFeedInsertFailedError(errThingNotFound)
{
err2, ok := err2.(UserFeedInsertFailedError)
if !ok {
t.Errorf("Assertion failed on UserFeedInsertFailed: %T is not UserFeedInsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 25 {
t.Errorf("Assertion failed on UserFeedInsertFailed: %d != 25", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on UserFeedInsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on UserFeedInsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, UserFeedInsertFailedError{}) {
t.Errorf("Assertion failed on UserFeedInsertFailed: UserFeedInsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, UserFeedInsertFailedError{}) {
t.Errorf("Assertion failed on UserFeedInsertFailed: UserFeedInsertFailedError{} not identified correctly")
}
if !errors.Is(err2, InsertQueryFailedError{}) {
t.Errorf("Assertion failed on UserFeedInsertFailed: InsertQueryFailedError{} not identified correctly")
}
}
}
func TestUserFeedUpsertFailed (t *testing.T) {
err1 := NewUserFeedUpsertFailedError(nil)
{
err1, ok := err1.(UserFeedUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on UserFeedUpsertFailed: %T is not UserFeedUpsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on UserFeedUpsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 26 {
t.Errorf("Assertion failed on UserFeedUpsertFailed: %d != 26", err1.Code())
}
if err1.Description() != "The upsert record operation for user feed failed." {
t.Errorf("Assertion failed on UserFeedUpsertFailed: %s != The upsert record operation for user feed failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewUserFeedUpsertFailedError(errThingNotFound)
{
err2, ok := err2.(UserFeedUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on UserFeedUpsertFailed: %T is not UserFeedUpsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 26 {
t.Errorf("Assertion failed on UserFeedUpsertFailed: %d != 26", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on UserFeedUpsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on UserFeedUpsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, UserFeedUpsertFailedError{}) {
t.Errorf("Assertion failed on UserFeedUpsertFailed: UserFeedUpsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, UserFeedUpsertFailedError{}) {
t.Errorf("Assertion failed on UserFeedUpsertFailed: UserFeedUpsertFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on UserFeedUpsertFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestUserFeedUpdateFailed (t *testing.T) {
err1 := NewUserFeedUpdateFailedError(nil)
{
err1, ok := err1.(UserFeedUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on UserFeedUpdateFailed: %T is not UserFeedUpdateFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on UserFeedUpdateFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 27 {
t.Errorf("Assertion failed on UserFeedUpdateFailed: %d != 27", err1.Code())
}
if err1.Description() != "The update record operation for user feed failed." {
t.Errorf("Assertion failed on UserFeedUpdateFailed: %s != The update record operation for user feed failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewUserFeedUpdateFailedError(errThingNotFound)
{
err2, ok := err2.(UserFeedUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on UserFeedUpdateFailed: %T is not UserFeedUpdateFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 27 {
t.Errorf("Assertion failed on UserFeedUpdateFailed: %d != 27", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on UserFeedUpdateFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on UserFeedUpdateFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, UserFeedUpdateFailedError{}) {
t.Errorf("Assertion failed on UserFeedUpdateFailed: UserFeedUpdateFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, UserFeedUpdateFailedError{}) {
t.Errorf("Assertion failed on UserFeedUpdateFailed: UserFeedUpdateFailedError{} not identified correctly")
}
if !errors.Is(err2, UpdateQueryFailedError{}) {
t.Errorf("Assertion failed on UserFeedUpdateFailed: UpdateQueryFailedError{} not identified correctly")
}
}
}
func TestUserFeedDeleteFailed (t *testing.T) {
err1 := NewUserFeedDeleteFailedError(nil)
{
err1, ok := err1.(UserFeedDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on UserFeedDeleteFailed: %T is not UserFeedDeleteFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on UserFeedDeleteFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 28 {
t.Errorf("Assertion failed on UserFeedDeleteFailed: %d != 28", err1.Code())
}
if err1.Description() != "The delete record operation for user feed failed." {
t.Errorf("Assertion failed on UserFeedDeleteFailed: %s != The delete record operation for user feed failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewUserFeedDeleteFailedError(errThingNotFound)
{
err2, ok := err2.(UserFeedDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on UserFeedDeleteFailed: %T is not UserFeedDeleteFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 28 {
t.Errorf("Assertion failed on UserFeedDeleteFailed: %d != 28", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on UserFeedDeleteFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on UserFeedDeleteFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, UserFeedDeleteFailedError{}) {
t.Errorf("Assertion failed on UserFeedDeleteFailed: UserFeedDeleteFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, UserFeedDeleteFailedError{}) {
t.Errorf("Assertion failed on UserFeedDeleteFailed: UserFeedDeleteFailedError{} not identified correctly")
}
if !errors.Is(err2, DeleteQueryFailedError{}) {
t.Errorf("Assertion failed on UserFeedDeleteFailed: DeleteQueryFailedError{} not identified correctly")
}
}
}
func TestInvalidUserFeed (t *testing.T) {
err1 := NewInvalidUserFeedError(nil)
{
err1, ok := err1.(InvalidUserFeedError)
if !ok {
t.Errorf("Assertion failed on InvalidUserFeed: %T is not InvalidUserFeedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on InvalidUserFeed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 29 {
t.Errorf("Assertion failed on InvalidUserFeed: %d != 29", err1.Code())
}
if err1.Description() != "The user feed is invalid." {
t.Errorf("Assertion failed on InvalidUserFeed: %s != The user feed is invalid.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewInvalidUserFeedError(errThingNotFound)
{
err2, ok := err2.(InvalidUserFeedError)
if !ok {
t.Errorf("Assertion failed on InvalidUserFeed: %T is not InvalidUserFeedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 29 {
t.Errorf("Assertion failed on InvalidUserFeed: %d != 29", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on InvalidUserFeed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on InvalidUserFeed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, InvalidUserFeedError{}) {
t.Errorf("Assertion failed on InvalidUserFeed: InvalidUserFeedError{} not identified correctly")
}
if !errors.Is(errNestErr2, InvalidUserFeedError{}) {
t.Errorf("Assertion failed on InvalidUserFeed: InvalidUserFeedError{} not identified correctly")
}
}
}
func TestUserFeedNotFound (t *testing.T) {
err1 := NewUserFeedNotFoundError(nil)
{
err1, ok := err1.(UserFeedNotFoundError)
if !ok {
t.Errorf("Assertion failed on UserFeedNotFound: %T is not UserFeedNotFoundError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on UserFeedNotFound: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 30 {
t.Errorf("Assertion failed on UserFeedNotFound: %d != 30", err1.Code())
}
if err1.Description() != "The user feed was not found." {
t.Errorf("Assertion failed on UserFeedNotFound: %s != The user feed was not found.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewUserFeedNotFoundError(errThingNotFound)
{
err2, ok := err2.(UserFeedNotFoundError)
if !ok {
t.Errorf("Assertion failed on UserFeedNotFound: %T is not UserFeedNotFoundError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 30 {
t.Errorf("Assertion failed on UserFeedNotFound: %d != 30", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on UserFeedNotFound: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on UserFeedNotFound: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, UserFeedNotFoundError{}) {
t.Errorf("Assertion failed on UserFeedNotFound: UserFeedNotFoundError{} not identified correctly")
}
if !errors.Is(errNestErr2, UserFeedNotFoundError{}) {
t.Errorf("Assertion failed on UserFeedNotFound: UserFeedNotFoundError{} not identified correctly")
}
if !errors.Is(err2, NotFoundError{}) {
t.Errorf("Assertion failed on UserFeedNotFound: NotFoundError{} not identified correctly")
}
}
}
func TestUserObjectEventQueryFailed (t *testing.T) {
err1 := NewUserObjectEventQueryFailedError(nil)
{
err1, ok := err1.(UserObjectEventQueryFailedError)
if !ok {
t.Errorf("Assertion failed on UserObjectEventQueryFailed: %T is not UserObjectEventQueryFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on UserObjectEventQueryFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 31 {
t.Errorf("Assertion failed on UserObjectEventQueryFailed: %d != 31", err1.Code())
}
if err1.Description() != "The user object event query failed." {
t.Errorf("Assertion failed on UserObjectEventQueryFailed: %s != The user object event query failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewUserObjectEventQueryFailedError(errThingNotFound)
{
err2, ok := err2.(UserObjectEventQueryFailedError)
if !ok {
t.Errorf("Assertion failed on UserObjectEventQueryFailed: %T is not UserObjectEventQueryFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 31 {
t.Errorf("Assertion failed on UserObjectEventQueryFailed: %d != 31", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on UserObjectEventQueryFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on UserObjectEventQueryFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, UserObjectEventQueryFailedError{}) {
t.Errorf("Assertion failed on UserObjectEventQueryFailed: UserObjectEventQueryFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, UserObjectEventQueryFailedError{}) {
t.Errorf("Assertion failed on UserObjectEventQueryFailed: UserObjectEventQueryFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on UserObjectEventQueryFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestUserObjectEventSelectFailed (t *testing.T) {
err1 := NewUserObjectEventSelectFailedError(nil)
{
err1, ok := err1.(UserObjectEventSelectFailedError)
if !ok {
t.Errorf("Assertion failed on UserObjectEventSelectFailed: %T is not UserObjectEventSelectFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on UserObjectEventSelectFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 32 {
t.Errorf("Assertion failed on UserObjectEventSelectFailed: %d != 32", err1.Code())
}
if err1.Description() != "The select record operation for user object event failed." {
t.Errorf("Assertion failed on UserObjectEventSelectFailed: %s != The select record operation for user object event failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewUserObjectEventSelectFailedError(errThingNotFound)
{
err2, ok := err2.(UserObjectEventSelectFailedError)
if !ok {
t.Errorf("Assertion failed on UserObjectEventSelectFailed: %T is not UserObjectEventSelectFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 32 {
t.Errorf("Assertion failed on UserObjectEventSelectFailed: %d != 32", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on UserObjectEventSelectFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on UserObjectEventSelectFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, UserObjectEventSelectFailedError{}) {
t.Errorf("Assertion failed on UserObjectEventSelectFailed: UserObjectEventSelectFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, UserObjectEventSelectFailedError{}) {
t.Errorf("Assertion failed on UserObjectEventSelectFailed: UserObjectEventSelectFailedError{} not identified correctly")
}
if !errors.Is(err2, SelectQueryFailedError{}) {
t.Errorf("Assertion failed on UserObjectEventSelectFailed: SelectQueryFailedError{} not identified correctly")
}
}
}
func TestUserObjectEventInsertFailed (t *testing.T) {
err1 := NewUserObjectEventInsertFailedError(nil)
{
err1, ok := err1.(UserObjectEventInsertFailedError)
if !ok {
t.Errorf("Assertion failed on UserObjectEventInsertFailed: %T is not UserObjectEventInsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on UserObjectEventInsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 33 {
t.Errorf("Assertion failed on UserObjectEventInsertFailed: %d != 33", err1.Code())
}
if err1.Description() != "The insert record operation for user object event failed." {
t.Errorf("Assertion failed on UserObjectEventInsertFailed: %s != The insert record operation for user object event failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewUserObjectEventInsertFailedError(errThingNotFound)
{
err2, ok := err2.(UserObjectEventInsertFailedError)
if !ok {
t.Errorf("Assertion failed on UserObjectEventInsertFailed: %T is not UserObjectEventInsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 33 {
t.Errorf("Assertion failed on UserObjectEventInsertFailed: %d != 33", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on UserObjectEventInsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on UserObjectEventInsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, UserObjectEventInsertFailedError{}) {
t.Errorf("Assertion failed on UserObjectEventInsertFailed: UserObjectEventInsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, UserObjectEventInsertFailedError{}) {
t.Errorf("Assertion failed on UserObjectEventInsertFailed: UserObjectEventInsertFailedError{} not identified correctly")
}
if !errors.Is(err2, InsertQueryFailedError{}) {
t.Errorf("Assertion failed on UserObjectEventInsertFailed: InsertQueryFailedError{} not identified correctly")
}
}
}
func TestUserObjectEventUpsertFailed (t *testing.T) {
err1 := NewUserObjectEventUpsertFailedError(nil)
{
err1, ok := err1.(UserObjectEventUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on UserObjectEventUpsertFailed: %T is not UserObjectEventUpsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on UserObjectEventUpsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 34 {
t.Errorf("Assertion failed on UserObjectEventUpsertFailed: %d != 34", err1.Code())
}
if err1.Description() != "The upsert record operation for user object event failed." {
t.Errorf("Assertion failed on UserObjectEventUpsertFailed: %s != The upsert record operation for user object event failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewUserObjectEventUpsertFailedError(errThingNotFound)
{
err2, ok := err2.(UserObjectEventUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on UserObjectEventUpsertFailed: %T is not UserObjectEventUpsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 34 {
t.Errorf("Assertion failed on UserObjectEventUpsertFailed: %d != 34", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on UserObjectEventUpsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on UserObjectEventUpsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, UserObjectEventUpsertFailedError{}) {
t.Errorf("Assertion failed on UserObjectEventUpsertFailed: UserObjectEventUpsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, UserObjectEventUpsertFailedError{}) {
t.Errorf("Assertion failed on UserObjectEventUpsertFailed: UserObjectEventUpsertFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on UserObjectEventUpsertFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestUserObjectEventUpdateFailed (t *testing.T) {
err1 := NewUserObjectEventUpdateFailedError(nil)
{
err1, ok := err1.(UserObjectEventUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on UserObjectEventUpdateFailed: %T is not UserObjectEventUpdateFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on UserObjectEventUpdateFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 35 {
t.Errorf("Assertion failed on UserObjectEventUpdateFailed: %d != 35", err1.Code())
}
if err1.Description() != "The update record operation for user object event failed." {
t.Errorf("Assertion failed on UserObjectEventUpdateFailed: %s != The update record operation for user object event failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewUserObjectEventUpdateFailedError(errThingNotFound)
{
err2, ok := err2.(UserObjectEventUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on UserObjectEventUpdateFailed: %T is not UserObjectEventUpdateFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 35 {
t.Errorf("Assertion failed on UserObjectEventUpdateFailed: %d != 35", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on UserObjectEventUpdateFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on UserObjectEventUpdateFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, UserObjectEventUpdateFailedError{}) {
t.Errorf("Assertion failed on UserObjectEventUpdateFailed: UserObjectEventUpdateFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, UserObjectEventUpdateFailedError{}) {
t.Errorf("Assertion failed on UserObjectEventUpdateFailed: UserObjectEventUpdateFailedError{} not identified correctly")
}
if !errors.Is(err2, UpdateQueryFailedError{}) {
t.Errorf("Assertion failed on UserObjectEventUpdateFailed: UpdateQueryFailedError{} not identified correctly")
}
}
}
func TestUserObjectEventDeleteFailed (t *testing.T) {
err1 := NewUserObjectEventDeleteFailedError(nil)
{
err1, ok := err1.(UserObjectEventDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on UserObjectEventDeleteFailed: %T is not UserObjectEventDeleteFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on UserObjectEventDeleteFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 36 {
t.Errorf("Assertion failed on UserObjectEventDeleteFailed: %d != 36", err1.Code())
}
if err1.Description() != "The delete record operation for user object event failed." {
t.Errorf("Assertion failed on UserObjectEventDeleteFailed: %s != The delete record operation for user object event failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewUserObjectEventDeleteFailedError(errThingNotFound)
{
err2, ok := err2.(UserObjectEventDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on UserObjectEventDeleteFailed: %T is not UserObjectEventDeleteFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 36 {
t.Errorf("Assertion failed on UserObjectEventDeleteFailed: %d != 36", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on UserObjectEventDeleteFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on UserObjectEventDeleteFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, UserObjectEventDeleteFailedError{}) {
t.Errorf("Assertion failed on UserObjectEventDeleteFailed: UserObjectEventDeleteFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, UserObjectEventDeleteFailedError{}) {
t.Errorf("Assertion failed on UserObjectEventDeleteFailed: UserObjectEventDeleteFailedError{} not identified correctly")
}
if !errors.Is(err2, DeleteQueryFailedError{}) {
t.Errorf("Assertion failed on UserObjectEventDeleteFailed: DeleteQueryFailedError{} not identified correctly")
}
}
}
func TestInvalidUserObjectEvent (t *testing.T) {
err1 := NewInvalidUserObjectEventError(nil)
{
err1, ok := err1.(InvalidUserObjectEventError)
if !ok {
t.Errorf("Assertion failed on InvalidUserObjectEvent: %T is not InvalidUserObjectEventError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on InvalidUserObjectEvent: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 37 {
t.Errorf("Assertion failed on InvalidUserObjectEvent: %d != 37", err1.Code())
}
if err1.Description() != "The user object event is invalid." {
t.Errorf("Assertion failed on InvalidUserObjectEvent: %s != The user object event is invalid.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewInvalidUserObjectEventError(errThingNotFound)
{
err2, ok := err2.(InvalidUserObjectEventError)
if !ok {
t.Errorf("Assertion failed on InvalidUserObjectEvent: %T is not InvalidUserObjectEventError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 37 {
t.Errorf("Assertion failed on InvalidUserObjectEvent: %d != 37", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on InvalidUserObjectEvent: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on InvalidUserObjectEvent: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, InvalidUserObjectEventError{}) {
t.Errorf("Assertion failed on InvalidUserObjectEvent: InvalidUserObjectEventError{} not identified correctly")
}
if !errors.Is(errNestErr2, InvalidUserObjectEventError{}) {
t.Errorf("Assertion failed on InvalidUserObjectEvent: InvalidUserObjectEventError{} not identified correctly")
}
}
}
func TestUserObjectEventNotFound (t *testing.T) {
err1 := NewUserObjectEventNotFoundError(nil)
{
err1, ok := err1.(UserObjectEventNotFoundError)
if !ok {
t.Errorf("Assertion failed on UserObjectEventNotFound: %T is not UserObjectEventNotFoundError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on UserObjectEventNotFound: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 38 {
t.Errorf("Assertion failed on UserObjectEventNotFound: %d != 38", err1.Code())
}
if err1.Description() != "The user object event was not found." {
t.Errorf("Assertion failed on UserObjectEventNotFound: %s != The user object event was not found.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewUserObjectEventNotFoundError(errThingNotFound)
{
err2, ok := err2.(UserObjectEventNotFoundError)
if !ok {
t.Errorf("Assertion failed on UserObjectEventNotFound: %T is not UserObjectEventNotFoundError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 38 {
t.Errorf("Assertion failed on UserObjectEventNotFound: %d != 38", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on UserObjectEventNotFound: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on UserObjectEventNotFound: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, UserObjectEventNotFoundError{}) {
t.Errorf("Assertion failed on UserObjectEventNotFound: UserObjectEventNotFoundError{} not identified correctly")
}
if !errors.Is(errNestErr2, UserObjectEventNotFoundError{}) {
t.Errorf("Assertion failed on UserObjectEventNotFound: UserObjectEventNotFoundError{} not identified correctly")
}
if !errors.Is(err2, NotFoundError{}) {
t.Errorf("Assertion failed on UserObjectEventNotFound: NotFoundError{} not identified correctly")
}
}
}
func TestActorQueryFailed (t *testing.T) {
err1 := NewActorQueryFailedError(nil)
{
err1, ok := err1.(ActorQueryFailedError)
if !ok {
t.Errorf("Assertion failed on ActorQueryFailed: %T is not ActorQueryFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ActorQueryFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 39 {
t.Errorf("Assertion failed on ActorQueryFailed: %d != 39", err1.Code())
}
if err1.Description() != "The actor query failed." {
t.Errorf("Assertion failed on ActorQueryFailed: %s != The actor query failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewActorQueryFailedError(errThingNotFound)
{
err2, ok := err2.(ActorQueryFailedError)
if !ok {
t.Errorf("Assertion failed on ActorQueryFailed: %T is not ActorQueryFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 39 {
t.Errorf("Assertion failed on ActorQueryFailed: %d != 39", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ActorQueryFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ActorQueryFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ActorQueryFailedError{}) {
t.Errorf("Assertion failed on ActorQueryFailed: ActorQueryFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ActorQueryFailedError{}) {
t.Errorf("Assertion failed on ActorQueryFailed: ActorQueryFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on ActorQueryFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestActorSelectFailed (t *testing.T) {
err1 := NewActorSelectFailedError(nil)
{
err1, ok := err1.(ActorSelectFailedError)
if !ok {
t.Errorf("Assertion failed on ActorSelectFailed: %T is not ActorSelectFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ActorSelectFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 40 {
t.Errorf("Assertion failed on ActorSelectFailed: %d != 40", err1.Code())
}
if err1.Description() != "The select record operation for actor failed." {
t.Errorf("Assertion failed on ActorSelectFailed: %s != The select record operation for actor failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewActorSelectFailedError(errThingNotFound)
{
err2, ok := err2.(ActorSelectFailedError)
if !ok {
t.Errorf("Assertion failed on ActorSelectFailed: %T is not ActorSelectFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 40 {
t.Errorf("Assertion failed on ActorSelectFailed: %d != 40", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ActorSelectFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ActorSelectFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ActorSelectFailedError{}) {
t.Errorf("Assertion failed on ActorSelectFailed: ActorSelectFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ActorSelectFailedError{}) {
t.Errorf("Assertion failed on ActorSelectFailed: ActorSelectFailedError{} not identified correctly")
}
if !errors.Is(err2, SelectQueryFailedError{}) {
t.Errorf("Assertion failed on ActorSelectFailed: SelectQueryFailedError{} not identified correctly")
}
}
}
func TestActorInsertFailed (t *testing.T) {
err1 := NewActorInsertFailedError(nil)
{
err1, ok := err1.(ActorInsertFailedError)
if !ok {
t.Errorf("Assertion failed on ActorInsertFailed: %T is not ActorInsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ActorInsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 41 {
t.Errorf("Assertion failed on ActorInsertFailed: %d != 41", err1.Code())
}
if err1.Description() != "The insert record operation for actor failed." {
t.Errorf("Assertion failed on ActorInsertFailed: %s != The insert record operation for actor failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewActorInsertFailedError(errThingNotFound)
{
err2, ok := err2.(ActorInsertFailedError)
if !ok {
t.Errorf("Assertion failed on ActorInsertFailed: %T is not ActorInsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 41 {
t.Errorf("Assertion failed on ActorInsertFailed: %d != 41", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ActorInsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ActorInsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ActorInsertFailedError{}) {
t.Errorf("Assertion failed on ActorInsertFailed: ActorInsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ActorInsertFailedError{}) {
t.Errorf("Assertion failed on ActorInsertFailed: ActorInsertFailedError{} not identified correctly")
}
if !errors.Is(err2, InsertQueryFailedError{}) {
t.Errorf("Assertion failed on ActorInsertFailed: InsertQueryFailedError{} not identified correctly")
}
}
}
func TestActorUpsertFailed (t *testing.T) {
err1 := NewActorUpsertFailedError(nil)
{
err1, ok := err1.(ActorUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on ActorUpsertFailed: %T is not ActorUpsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ActorUpsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 42 {
t.Errorf("Assertion failed on ActorUpsertFailed: %d != 42", err1.Code())
}
if err1.Description() != "The upsert record operation for actor failed." {
t.Errorf("Assertion failed on ActorUpsertFailed: %s != The upsert record operation for actor failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewActorUpsertFailedError(errThingNotFound)
{
err2, ok := err2.(ActorUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on ActorUpsertFailed: %T is not ActorUpsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 42 {
t.Errorf("Assertion failed on ActorUpsertFailed: %d != 42", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ActorUpsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ActorUpsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ActorUpsertFailedError{}) {
t.Errorf("Assertion failed on ActorUpsertFailed: ActorUpsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ActorUpsertFailedError{}) {
t.Errorf("Assertion failed on ActorUpsertFailed: ActorUpsertFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on ActorUpsertFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestActorUpdateFailed (t *testing.T) {
err1 := NewActorUpdateFailedError(nil)
{
err1, ok := err1.(ActorUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on ActorUpdateFailed: %T is not ActorUpdateFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ActorUpdateFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 43 {
t.Errorf("Assertion failed on ActorUpdateFailed: %d != 43", err1.Code())
}
if err1.Description() != "The update record operation for actor failed." {
t.Errorf("Assertion failed on ActorUpdateFailed: %s != The update record operation for actor failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewActorUpdateFailedError(errThingNotFound)
{
err2, ok := err2.(ActorUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on ActorUpdateFailed: %T is not ActorUpdateFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 43 {
t.Errorf("Assertion failed on ActorUpdateFailed: %d != 43", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ActorUpdateFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ActorUpdateFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ActorUpdateFailedError{}) {
t.Errorf("Assertion failed on ActorUpdateFailed: ActorUpdateFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ActorUpdateFailedError{}) {
t.Errorf("Assertion failed on ActorUpdateFailed: ActorUpdateFailedError{} not identified correctly")
}
if !errors.Is(err2, UpdateQueryFailedError{}) {
t.Errorf("Assertion failed on ActorUpdateFailed: UpdateQueryFailedError{} not identified correctly")
}
}
}
func TestActorDeleteFailed (t *testing.T) {
err1 := NewActorDeleteFailedError(nil)
{
err1, ok := err1.(ActorDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on ActorDeleteFailed: %T is not ActorDeleteFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ActorDeleteFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 44 {
t.Errorf("Assertion failed on ActorDeleteFailed: %d != 44", err1.Code())
}
if err1.Description() != "The delete record operation for actor failed." {
t.Errorf("Assertion failed on ActorDeleteFailed: %s != The delete record operation for actor failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewActorDeleteFailedError(errThingNotFound)
{
err2, ok := err2.(ActorDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on ActorDeleteFailed: %T is not ActorDeleteFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 44 {
t.Errorf("Assertion failed on ActorDeleteFailed: %d != 44", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ActorDeleteFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ActorDeleteFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ActorDeleteFailedError{}) {
t.Errorf("Assertion failed on ActorDeleteFailed: ActorDeleteFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ActorDeleteFailedError{}) {
t.Errorf("Assertion failed on ActorDeleteFailed: ActorDeleteFailedError{} not identified correctly")
}
if !errors.Is(err2, DeleteQueryFailedError{}) {
t.Errorf("Assertion failed on ActorDeleteFailed: DeleteQueryFailedError{} not identified correctly")
}
}
}
func TestInvalidActor (t *testing.T) {
err1 := NewInvalidActorError(nil)
{
err1, ok := err1.(InvalidActorError)
if !ok {
t.Errorf("Assertion failed on InvalidActor: %T is not InvalidActorError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on InvalidActor: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 45 {
t.Errorf("Assertion failed on InvalidActor: %d != 45", err1.Code())
}
if err1.Description() != "The actor is invalid." {
t.Errorf("Assertion failed on InvalidActor: %s != The actor is invalid.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewInvalidActorError(errThingNotFound)
{
err2, ok := err2.(InvalidActorError)
if !ok {
t.Errorf("Assertion failed on InvalidActor: %T is not InvalidActorError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 45 {
t.Errorf("Assertion failed on InvalidActor: %d != 45", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on InvalidActor: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on InvalidActor: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, InvalidActorError{}) {
t.Errorf("Assertion failed on InvalidActor: InvalidActorError{} not identified correctly")
}
if !errors.Is(errNestErr2, InvalidActorError{}) {
t.Errorf("Assertion failed on InvalidActor: InvalidActorError{} not identified correctly")
}
}
}
func TestActorNotFound (t *testing.T) {
err1 := NewActorNotFoundError(nil)
{
err1, ok := err1.(ActorNotFoundError)
if !ok {
t.Errorf("Assertion failed on ActorNotFound: %T is not ActorNotFoundError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ActorNotFound: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 46 {
t.Errorf("Assertion failed on ActorNotFound: %d != 46", err1.Code())
}
if err1.Description() != "The actor was not found." {
t.Errorf("Assertion failed on ActorNotFound: %s != The actor was not found.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewActorNotFoundError(errThingNotFound)
{
err2, ok := err2.(ActorNotFoundError)
if !ok {
t.Errorf("Assertion failed on ActorNotFound: %T is not ActorNotFoundError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 46 {
t.Errorf("Assertion failed on ActorNotFound: %d != 46", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ActorNotFound: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ActorNotFound: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ActorNotFoundError{}) {
t.Errorf("Assertion failed on ActorNotFound: ActorNotFoundError{} not identified correctly")
}
if !errors.Is(errNestErr2, ActorNotFoundError{}) {
t.Errorf("Assertion failed on ActorNotFound: ActorNotFoundError{} not identified correctly")
}
if !errors.Is(err2, NotFoundError{}) {
t.Errorf("Assertion failed on ActorNotFound: NotFoundError{} not identified correctly")
}
}
}
func TestActorAliasQueryFailed (t *testing.T) {
err1 := NewActorAliasQueryFailedError(nil)
{
err1, ok := err1.(ActorAliasQueryFailedError)
if !ok {
t.Errorf("Assertion failed on ActorAliasQueryFailed: %T is not ActorAliasQueryFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ActorAliasQueryFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 47 {
t.Errorf("Assertion failed on ActorAliasQueryFailed: %d != 47", err1.Code())
}
if err1.Description() != "The actor alias query failed." {
t.Errorf("Assertion failed on ActorAliasQueryFailed: %s != The actor alias query failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewActorAliasQueryFailedError(errThingNotFound)
{
err2, ok := err2.(ActorAliasQueryFailedError)
if !ok {
t.Errorf("Assertion failed on ActorAliasQueryFailed: %T is not ActorAliasQueryFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 47 {
t.Errorf("Assertion failed on ActorAliasQueryFailed: %d != 47", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ActorAliasQueryFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ActorAliasQueryFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ActorAliasQueryFailedError{}) {
t.Errorf("Assertion failed on ActorAliasQueryFailed: ActorAliasQueryFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ActorAliasQueryFailedError{}) {
t.Errorf("Assertion failed on ActorAliasQueryFailed: ActorAliasQueryFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on ActorAliasQueryFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestActorAliasSelectFailed (t *testing.T) {
err1 := NewActorAliasSelectFailedError(nil)
{
err1, ok := err1.(ActorAliasSelectFailedError)
if !ok {
t.Errorf("Assertion failed on ActorAliasSelectFailed: %T is not ActorAliasSelectFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ActorAliasSelectFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 48 {
t.Errorf("Assertion failed on ActorAliasSelectFailed: %d != 48", err1.Code())
}
if err1.Description() != "The select record operation for actor alias failed." {
t.Errorf("Assertion failed on ActorAliasSelectFailed: %s != The select record operation for actor alias failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewActorAliasSelectFailedError(errThingNotFound)
{
err2, ok := err2.(ActorAliasSelectFailedError)
if !ok {
t.Errorf("Assertion failed on ActorAliasSelectFailed: %T is not ActorAliasSelectFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 48 {
t.Errorf("Assertion failed on ActorAliasSelectFailed: %d != 48", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ActorAliasSelectFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ActorAliasSelectFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ActorAliasSelectFailedError{}) {
t.Errorf("Assertion failed on ActorAliasSelectFailed: ActorAliasSelectFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ActorAliasSelectFailedError{}) {
t.Errorf("Assertion failed on ActorAliasSelectFailed: ActorAliasSelectFailedError{} not identified correctly")
}
if !errors.Is(err2, SelectQueryFailedError{}) {
t.Errorf("Assertion failed on ActorAliasSelectFailed: SelectQueryFailedError{} not identified correctly")
}
}
}
func TestActorAliasInsertFailed (t *testing.T) {
err1 := NewActorAliasInsertFailedError(nil)
{
err1, ok := err1.(ActorAliasInsertFailedError)
if !ok {
t.Errorf("Assertion failed on ActorAliasInsertFailed: %T is not ActorAliasInsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ActorAliasInsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 49 {
t.Errorf("Assertion failed on ActorAliasInsertFailed: %d != 49", err1.Code())
}
if err1.Description() != "The insert record operation for actor alias failed." {
t.Errorf("Assertion failed on ActorAliasInsertFailed: %s != The insert record operation for actor alias failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewActorAliasInsertFailedError(errThingNotFound)
{
err2, ok := err2.(ActorAliasInsertFailedError)
if !ok {
t.Errorf("Assertion failed on ActorAliasInsertFailed: %T is not ActorAliasInsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 49 {
t.Errorf("Assertion failed on ActorAliasInsertFailed: %d != 49", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ActorAliasInsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ActorAliasInsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ActorAliasInsertFailedError{}) {
t.Errorf("Assertion failed on ActorAliasInsertFailed: ActorAliasInsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ActorAliasInsertFailedError{}) {
t.Errorf("Assertion failed on ActorAliasInsertFailed: ActorAliasInsertFailedError{} not identified correctly")
}
if !errors.Is(err2, InsertQueryFailedError{}) {
t.Errorf("Assertion failed on ActorAliasInsertFailed: InsertQueryFailedError{} not identified correctly")
}
}
}
func TestActorAliasUpsertFailed (t *testing.T) {
err1 := NewActorAliasUpsertFailedError(nil)
{
err1, ok := err1.(ActorAliasUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on ActorAliasUpsertFailed: %T is not ActorAliasUpsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ActorAliasUpsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 50 {
t.Errorf("Assertion failed on ActorAliasUpsertFailed: %d != 50", err1.Code())
}
if err1.Description() != "The upsert record operation for actor alias failed." {
t.Errorf("Assertion failed on ActorAliasUpsertFailed: %s != The upsert record operation for actor alias failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewActorAliasUpsertFailedError(errThingNotFound)
{
err2, ok := err2.(ActorAliasUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on ActorAliasUpsertFailed: %T is not ActorAliasUpsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 50 {
t.Errorf("Assertion failed on ActorAliasUpsertFailed: %d != 50", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ActorAliasUpsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ActorAliasUpsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ActorAliasUpsertFailedError{}) {
t.Errorf("Assertion failed on ActorAliasUpsertFailed: ActorAliasUpsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ActorAliasUpsertFailedError{}) {
t.Errorf("Assertion failed on ActorAliasUpsertFailed: ActorAliasUpsertFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on ActorAliasUpsertFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestActorAliasUpdateFailed (t *testing.T) {
err1 := NewActorAliasUpdateFailedError(nil)
{
err1, ok := err1.(ActorAliasUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on ActorAliasUpdateFailed: %T is not ActorAliasUpdateFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ActorAliasUpdateFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 51 {
t.Errorf("Assertion failed on ActorAliasUpdateFailed: %d != 51", err1.Code())
}
if err1.Description() != "The update record operation for actor alias failed." {
t.Errorf("Assertion failed on ActorAliasUpdateFailed: %s != The update record operation for actor alias failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewActorAliasUpdateFailedError(errThingNotFound)
{
err2, ok := err2.(ActorAliasUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on ActorAliasUpdateFailed: %T is not ActorAliasUpdateFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 51 {
t.Errorf("Assertion failed on ActorAliasUpdateFailed: %d != 51", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ActorAliasUpdateFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ActorAliasUpdateFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ActorAliasUpdateFailedError{}) {
t.Errorf("Assertion failed on ActorAliasUpdateFailed: ActorAliasUpdateFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ActorAliasUpdateFailedError{}) {
t.Errorf("Assertion failed on ActorAliasUpdateFailed: ActorAliasUpdateFailedError{} not identified correctly")
}
if !errors.Is(err2, UpdateQueryFailedError{}) {
t.Errorf("Assertion failed on ActorAliasUpdateFailed: UpdateQueryFailedError{} not identified correctly")
}
}
}
func TestActorAliasDeleteFailed (t *testing.T) {
err1 := NewActorAliasDeleteFailedError(nil)
{
err1, ok := err1.(ActorAliasDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on ActorAliasDeleteFailed: %T is not ActorAliasDeleteFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ActorAliasDeleteFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 52 {
t.Errorf("Assertion failed on ActorAliasDeleteFailed: %d != 52", err1.Code())
}
if err1.Description() != "The delete record operation for actor alias failed." {
t.Errorf("Assertion failed on ActorAliasDeleteFailed: %s != The delete record operation for actor alias failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewActorAliasDeleteFailedError(errThingNotFound)
{
err2, ok := err2.(ActorAliasDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on ActorAliasDeleteFailed: %T is not ActorAliasDeleteFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 52 {
t.Errorf("Assertion failed on ActorAliasDeleteFailed: %d != 52", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ActorAliasDeleteFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ActorAliasDeleteFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ActorAliasDeleteFailedError{}) {
t.Errorf("Assertion failed on ActorAliasDeleteFailed: ActorAliasDeleteFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ActorAliasDeleteFailedError{}) {
t.Errorf("Assertion failed on ActorAliasDeleteFailed: ActorAliasDeleteFailedError{} not identified correctly")
}
if !errors.Is(err2, DeleteQueryFailedError{}) {
t.Errorf("Assertion failed on ActorAliasDeleteFailed: DeleteQueryFailedError{} not identified correctly")
}
}
}
func TestInvalidActorAlias (t *testing.T) {
err1 := NewInvalidActorAliasError(nil)
{
err1, ok := err1.(InvalidActorAliasError)
if !ok {
t.Errorf("Assertion failed on InvalidActorAlias: %T is not InvalidActorAliasError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on InvalidActorAlias: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 53 {
t.Errorf("Assertion failed on InvalidActorAlias: %d != 53", err1.Code())
}
if err1.Description() != "The actor alias is invalid." {
t.Errorf("Assertion failed on InvalidActorAlias: %s != The actor alias is invalid.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewInvalidActorAliasError(errThingNotFound)
{
err2, ok := err2.(InvalidActorAliasError)
if !ok {
t.Errorf("Assertion failed on InvalidActorAlias: %T is not InvalidActorAliasError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 53 {
t.Errorf("Assertion failed on InvalidActorAlias: %d != 53", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on InvalidActorAlias: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on InvalidActorAlias: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, InvalidActorAliasError{}) {
t.Errorf("Assertion failed on InvalidActorAlias: InvalidActorAliasError{} not identified correctly")
}
if !errors.Is(errNestErr2, InvalidActorAliasError{}) {
t.Errorf("Assertion failed on InvalidActorAlias: InvalidActorAliasError{} not identified correctly")
}
}
}
func TestActorAliasNotFound (t *testing.T) {
err1 := NewActorAliasNotFoundError(nil)
{
err1, ok := err1.(ActorAliasNotFoundError)
if !ok {
t.Errorf("Assertion failed on ActorAliasNotFound: %T is not ActorAliasNotFoundError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ActorAliasNotFound: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 54 {
t.Errorf("Assertion failed on ActorAliasNotFound: %d != 54", err1.Code())
}
if err1.Description() != "The actor alias was not found." {
t.Errorf("Assertion failed on ActorAliasNotFound: %s != The actor alias was not found.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewActorAliasNotFoundError(errThingNotFound)
{
err2, ok := err2.(ActorAliasNotFoundError)
if !ok {
t.Errorf("Assertion failed on ActorAliasNotFound: %T is not ActorAliasNotFoundError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 54 {
t.Errorf("Assertion failed on ActorAliasNotFound: %d != 54", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ActorAliasNotFound: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ActorAliasNotFound: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ActorAliasNotFoundError{}) {
t.Errorf("Assertion failed on ActorAliasNotFound: ActorAliasNotFoundError{} not identified correctly")
}
if !errors.Is(errNestErr2, ActorAliasNotFoundError{}) {
t.Errorf("Assertion failed on ActorAliasNotFound: ActorAliasNotFoundError{} not identified correctly")
}
if !errors.Is(err2, NotFoundError{}) {
t.Errorf("Assertion failed on ActorAliasNotFound: NotFoundError{} not identified correctly")
}
}
}
func TestActorKeyQueryFailed (t *testing.T) {
err1 := NewActorKeyQueryFailedError(nil)
{
err1, ok := err1.(ActorKeyQueryFailedError)
if !ok {
t.Errorf("Assertion failed on ActorKeyQueryFailed: %T is not ActorKeyQueryFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ActorKeyQueryFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 55 {
t.Errorf("Assertion failed on ActorKeyQueryFailed: %d != 55", err1.Code())
}
if err1.Description() != "The actor key query failed." {
t.Errorf("Assertion failed on ActorKeyQueryFailed: %s != The actor key query failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewActorKeyQueryFailedError(errThingNotFound)
{
err2, ok := err2.(ActorKeyQueryFailedError)
if !ok {
t.Errorf("Assertion failed on ActorKeyQueryFailed: %T is not ActorKeyQueryFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 55 {
t.Errorf("Assertion failed on ActorKeyQueryFailed: %d != 55", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ActorKeyQueryFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ActorKeyQueryFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ActorKeyQueryFailedError{}) {
t.Errorf("Assertion failed on ActorKeyQueryFailed: ActorKeyQueryFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ActorKeyQueryFailedError{}) {
t.Errorf("Assertion failed on ActorKeyQueryFailed: ActorKeyQueryFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on ActorKeyQueryFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestActorKeySelectFailed (t *testing.T) {
err1 := NewActorKeySelectFailedError(nil)
{
err1, ok := err1.(ActorKeySelectFailedError)
if !ok {
t.Errorf("Assertion failed on ActorKeySelectFailed: %T is not ActorKeySelectFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ActorKeySelectFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 56 {
t.Errorf("Assertion failed on ActorKeySelectFailed: %d != 56", err1.Code())
}
if err1.Description() != "The select record operation for actor key failed." {
t.Errorf("Assertion failed on ActorKeySelectFailed: %s != The select record operation for actor key failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewActorKeySelectFailedError(errThingNotFound)
{
err2, ok := err2.(ActorKeySelectFailedError)
if !ok {
t.Errorf("Assertion failed on ActorKeySelectFailed: %T is not ActorKeySelectFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 56 {
t.Errorf("Assertion failed on ActorKeySelectFailed: %d != 56", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ActorKeySelectFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ActorKeySelectFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ActorKeySelectFailedError{}) {
t.Errorf("Assertion failed on ActorKeySelectFailed: ActorKeySelectFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ActorKeySelectFailedError{}) {
t.Errorf("Assertion failed on ActorKeySelectFailed: ActorKeySelectFailedError{} not identified correctly")
}
if !errors.Is(err2, SelectQueryFailedError{}) {
t.Errorf("Assertion failed on ActorKeySelectFailed: SelectQueryFailedError{} not identified correctly")
}
}
}
func TestActorKeyInsertFailed (t *testing.T) {
err1 := NewActorKeyInsertFailedError(nil)
{
err1, ok := err1.(ActorKeyInsertFailedError)
if !ok {
t.Errorf("Assertion failed on ActorKeyInsertFailed: %T is not ActorKeyInsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ActorKeyInsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 57 {
t.Errorf("Assertion failed on ActorKeyInsertFailed: %d != 57", err1.Code())
}
if err1.Description() != "The insert record operation for actor key failed." {
t.Errorf("Assertion failed on ActorKeyInsertFailed: %s != The insert record operation for actor key failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewActorKeyInsertFailedError(errThingNotFound)
{
err2, ok := err2.(ActorKeyInsertFailedError)
if !ok {
t.Errorf("Assertion failed on ActorKeyInsertFailed: %T is not ActorKeyInsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 57 {
t.Errorf("Assertion failed on ActorKeyInsertFailed: %d != 57", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ActorKeyInsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ActorKeyInsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ActorKeyInsertFailedError{}) {
t.Errorf("Assertion failed on ActorKeyInsertFailed: ActorKeyInsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ActorKeyInsertFailedError{}) {
t.Errorf("Assertion failed on ActorKeyInsertFailed: ActorKeyInsertFailedError{} not identified correctly")
}
if !errors.Is(err2, InsertQueryFailedError{}) {
t.Errorf("Assertion failed on ActorKeyInsertFailed: InsertQueryFailedError{} not identified correctly")
}
}
}
func TestActorKeyUpsertFailed (t *testing.T) {
err1 := NewActorKeyUpsertFailedError(nil)
{
err1, ok := err1.(ActorKeyUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on ActorKeyUpsertFailed: %T is not ActorKeyUpsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ActorKeyUpsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 58 {
t.Errorf("Assertion failed on ActorKeyUpsertFailed: %d != 58", err1.Code())
}
if err1.Description() != "The upsert record operation for actor key failed." {
t.Errorf("Assertion failed on ActorKeyUpsertFailed: %s != The upsert record operation for actor key failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewActorKeyUpsertFailedError(errThingNotFound)
{
err2, ok := err2.(ActorKeyUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on ActorKeyUpsertFailed: %T is not ActorKeyUpsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 58 {
t.Errorf("Assertion failed on ActorKeyUpsertFailed: %d != 58", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ActorKeyUpsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ActorKeyUpsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ActorKeyUpsertFailedError{}) {
t.Errorf("Assertion failed on ActorKeyUpsertFailed: ActorKeyUpsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ActorKeyUpsertFailedError{}) {
t.Errorf("Assertion failed on ActorKeyUpsertFailed: ActorKeyUpsertFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on ActorKeyUpsertFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestActorKeyUpdateFailed (t *testing.T) {
err1 := NewActorKeyUpdateFailedError(nil)
{
err1, ok := err1.(ActorKeyUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on ActorKeyUpdateFailed: %T is not ActorKeyUpdateFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ActorKeyUpdateFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 59 {
t.Errorf("Assertion failed on ActorKeyUpdateFailed: %d != 59", err1.Code())
}
if err1.Description() != "The update record operation for actor key failed." {
t.Errorf("Assertion failed on ActorKeyUpdateFailed: %s != The update record operation for actor key failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewActorKeyUpdateFailedError(errThingNotFound)
{
err2, ok := err2.(ActorKeyUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on ActorKeyUpdateFailed: %T is not ActorKeyUpdateFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 59 {
t.Errorf("Assertion failed on ActorKeyUpdateFailed: %d != 59", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ActorKeyUpdateFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ActorKeyUpdateFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ActorKeyUpdateFailedError{}) {
t.Errorf("Assertion failed on ActorKeyUpdateFailed: ActorKeyUpdateFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ActorKeyUpdateFailedError{}) {
t.Errorf("Assertion failed on ActorKeyUpdateFailed: ActorKeyUpdateFailedError{} not identified correctly")
}
if !errors.Is(err2, UpdateQueryFailedError{}) {
t.Errorf("Assertion failed on ActorKeyUpdateFailed: UpdateQueryFailedError{} not identified correctly")
}
}
}
func TestActorKeyDeleteFailed (t *testing.T) {
err1 := NewActorKeyDeleteFailedError(nil)
{
err1, ok := err1.(ActorKeyDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on ActorKeyDeleteFailed: %T is not ActorKeyDeleteFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ActorKeyDeleteFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 60 {
t.Errorf("Assertion failed on ActorKeyDeleteFailed: %d != 60", err1.Code())
}
if err1.Description() != "The delete record operation for actor key failed." {
t.Errorf("Assertion failed on ActorKeyDeleteFailed: %s != The delete record operation for actor key failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewActorKeyDeleteFailedError(errThingNotFound)
{
err2, ok := err2.(ActorKeyDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on ActorKeyDeleteFailed: %T is not ActorKeyDeleteFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 60 {
t.Errorf("Assertion failed on ActorKeyDeleteFailed: %d != 60", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ActorKeyDeleteFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ActorKeyDeleteFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ActorKeyDeleteFailedError{}) {
t.Errorf("Assertion failed on ActorKeyDeleteFailed: ActorKeyDeleteFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ActorKeyDeleteFailedError{}) {
t.Errorf("Assertion failed on ActorKeyDeleteFailed: ActorKeyDeleteFailedError{} not identified correctly")
}
if !errors.Is(err2, DeleteQueryFailedError{}) {
t.Errorf("Assertion failed on ActorKeyDeleteFailed: DeleteQueryFailedError{} not identified correctly")
}
}
}
func TestInvalidActorKey (t *testing.T) {
err1 := NewInvalidActorKeyError(nil)
{
err1, ok := err1.(InvalidActorKeyError)
if !ok {
t.Errorf("Assertion failed on InvalidActorKey: %T is not InvalidActorKeyError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on InvalidActorKey: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 61 {
t.Errorf("Assertion failed on InvalidActorKey: %d != 61", err1.Code())
}
if err1.Description() != "The actor key is invalid." {
t.Errorf("Assertion failed on InvalidActorKey: %s != The actor key is invalid.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewInvalidActorKeyError(errThingNotFound)
{
err2, ok := err2.(InvalidActorKeyError)
if !ok {
t.Errorf("Assertion failed on InvalidActorKey: %T is not InvalidActorKeyError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 61 {
t.Errorf("Assertion failed on InvalidActorKey: %d != 61", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on InvalidActorKey: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on InvalidActorKey: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, InvalidActorKeyError{}) {
t.Errorf("Assertion failed on InvalidActorKey: InvalidActorKeyError{} not identified correctly")
}
if !errors.Is(errNestErr2, InvalidActorKeyError{}) {
t.Errorf("Assertion failed on InvalidActorKey: InvalidActorKeyError{} not identified correctly")
}
}
}
func TestActorKeyNotFound (t *testing.T) {
err1 := NewActorKeyNotFoundError(nil)
{
err1, ok := err1.(ActorKeyNotFoundError)
if !ok {
t.Errorf("Assertion failed on ActorKeyNotFound: %T is not ActorKeyNotFoundError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ActorKeyNotFound: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 62 {
t.Errorf("Assertion failed on ActorKeyNotFound: %d != 62", err1.Code())
}
if err1.Description() != "The actor key was not found." {
t.Errorf("Assertion failed on ActorKeyNotFound: %s != The actor key was not found.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewActorKeyNotFoundError(errThingNotFound)
{
err2, ok := err2.(ActorKeyNotFoundError)
if !ok {
t.Errorf("Assertion failed on ActorKeyNotFound: %T is not ActorKeyNotFoundError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 62 {
t.Errorf("Assertion failed on ActorKeyNotFound: %d != 62", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ActorKeyNotFound: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ActorKeyNotFound: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ActorKeyNotFoundError{}) {
t.Errorf("Assertion failed on ActorKeyNotFound: ActorKeyNotFoundError{} not identified correctly")
}
if !errors.Is(errNestErr2, ActorKeyNotFoundError{}) {
t.Errorf("Assertion failed on ActorKeyNotFound: ActorKeyNotFoundError{} not identified correctly")
}
if !errors.Is(err2, NotFoundError{}) {
t.Errorf("Assertion failed on ActorKeyNotFound: NotFoundError{} not identified correctly")
}
}
}
func TestNetworkRelationshipQueryFailed (t *testing.T) {
err1 := NewNetworkRelationshipQueryFailedError(nil)
{
err1, ok := err1.(NetworkRelationshipQueryFailedError)
if !ok {
t.Errorf("Assertion failed on NetworkRelationshipQueryFailed: %T is not NetworkRelationshipQueryFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on NetworkRelationshipQueryFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 63 {
t.Errorf("Assertion failed on NetworkRelationshipQueryFailed: %d != 63", err1.Code())
}
if err1.Description() != "The network relationship query failed." {
t.Errorf("Assertion failed on NetworkRelationshipQueryFailed: %s != The network relationship query failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewNetworkRelationshipQueryFailedError(errThingNotFound)
{
err2, ok := err2.(NetworkRelationshipQueryFailedError)
if !ok {
t.Errorf("Assertion failed on NetworkRelationshipQueryFailed: %T is not NetworkRelationshipQueryFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 63 {
t.Errorf("Assertion failed on NetworkRelationshipQueryFailed: %d != 63", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on NetworkRelationshipQueryFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on NetworkRelationshipQueryFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, NetworkRelationshipQueryFailedError{}) {
t.Errorf("Assertion failed on NetworkRelationshipQueryFailed: NetworkRelationshipQueryFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, NetworkRelationshipQueryFailedError{}) {
t.Errorf("Assertion failed on NetworkRelationshipQueryFailed: NetworkRelationshipQueryFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on NetworkRelationshipQueryFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestNetworkRelationshipSelectFailed (t *testing.T) {
err1 := NewNetworkRelationshipSelectFailedError(nil)
{
err1, ok := err1.(NetworkRelationshipSelectFailedError)
if !ok {
t.Errorf("Assertion failed on NetworkRelationshipSelectFailed: %T is not NetworkRelationshipSelectFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on NetworkRelationshipSelectFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 64 {
t.Errorf("Assertion failed on NetworkRelationshipSelectFailed: %d != 64", err1.Code())
}
if err1.Description() != "The select record operation for network relationship failed." {
t.Errorf("Assertion failed on NetworkRelationshipSelectFailed: %s != The select record operation for network relationship failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewNetworkRelationshipSelectFailedError(errThingNotFound)
{
err2, ok := err2.(NetworkRelationshipSelectFailedError)
if !ok {
t.Errorf("Assertion failed on NetworkRelationshipSelectFailed: %T is not NetworkRelationshipSelectFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 64 {
t.Errorf("Assertion failed on NetworkRelationshipSelectFailed: %d != 64", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on NetworkRelationshipSelectFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on NetworkRelationshipSelectFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, NetworkRelationshipSelectFailedError{}) {
t.Errorf("Assertion failed on NetworkRelationshipSelectFailed: NetworkRelationshipSelectFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, NetworkRelationshipSelectFailedError{}) {
t.Errorf("Assertion failed on NetworkRelationshipSelectFailed: NetworkRelationshipSelectFailedError{} not identified correctly")
}
if !errors.Is(err2, SelectQueryFailedError{}) {
t.Errorf("Assertion failed on NetworkRelationshipSelectFailed: SelectQueryFailedError{} not identified correctly")
}
}
}
func TestNetworkRelationshipInsertFailed (t *testing.T) {
err1 := NewNetworkRelationshipInsertFailedError(nil)
{
err1, ok := err1.(NetworkRelationshipInsertFailedError)
if !ok {
t.Errorf("Assertion failed on NetworkRelationshipInsertFailed: %T is not NetworkRelationshipInsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on NetworkRelationshipInsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 65 {
t.Errorf("Assertion failed on NetworkRelationshipInsertFailed: %d != 65", err1.Code())
}
if err1.Description() != "The insert record operation for network relationship failed." {
t.Errorf("Assertion failed on NetworkRelationshipInsertFailed: %s != The insert record operation for network relationship failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewNetworkRelationshipInsertFailedError(errThingNotFound)
{
err2, ok := err2.(NetworkRelationshipInsertFailedError)
if !ok {
t.Errorf("Assertion failed on NetworkRelationshipInsertFailed: %T is not NetworkRelationshipInsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 65 {
t.Errorf("Assertion failed on NetworkRelationshipInsertFailed: %d != 65", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on NetworkRelationshipInsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on NetworkRelationshipInsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, NetworkRelationshipInsertFailedError{}) {
t.Errorf("Assertion failed on NetworkRelationshipInsertFailed: NetworkRelationshipInsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, NetworkRelationshipInsertFailedError{}) {
t.Errorf("Assertion failed on NetworkRelationshipInsertFailed: NetworkRelationshipInsertFailedError{} not identified correctly")
}
if !errors.Is(err2, InsertQueryFailedError{}) {
t.Errorf("Assertion failed on NetworkRelationshipInsertFailed: InsertQueryFailedError{} not identified correctly")
}
}
}
func TestNetworkRelationshipUpsertFailed (t *testing.T) {
err1 := NewNetworkRelationshipUpsertFailedError(nil)
{
err1, ok := err1.(NetworkRelationshipUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on NetworkRelationshipUpsertFailed: %T is not NetworkRelationshipUpsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on NetworkRelationshipUpsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 66 {
t.Errorf("Assertion failed on NetworkRelationshipUpsertFailed: %d != 66", err1.Code())
}
if err1.Description() != "The upsert record operation for network relationship failed." {
t.Errorf("Assertion failed on NetworkRelationshipUpsertFailed: %s != The upsert record operation for network relationship failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewNetworkRelationshipUpsertFailedError(errThingNotFound)
{
err2, ok := err2.(NetworkRelationshipUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on NetworkRelationshipUpsertFailed: %T is not NetworkRelationshipUpsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 66 {
t.Errorf("Assertion failed on NetworkRelationshipUpsertFailed: %d != 66", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on NetworkRelationshipUpsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on NetworkRelationshipUpsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, NetworkRelationshipUpsertFailedError{}) {
t.Errorf("Assertion failed on NetworkRelationshipUpsertFailed: NetworkRelationshipUpsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, NetworkRelationshipUpsertFailedError{}) {
t.Errorf("Assertion failed on NetworkRelationshipUpsertFailed: NetworkRelationshipUpsertFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on NetworkRelationshipUpsertFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestNetworkRelationshipUpdateFailed (t *testing.T) {
err1 := NewNetworkRelationshipUpdateFailedError(nil)
{
err1, ok := err1.(NetworkRelationshipUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on NetworkRelationshipUpdateFailed: %T is not NetworkRelationshipUpdateFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on NetworkRelationshipUpdateFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 67 {
t.Errorf("Assertion failed on NetworkRelationshipUpdateFailed: %d != 67", err1.Code())
}
if err1.Description() != "The update record operation for network relationship failed." {
t.Errorf("Assertion failed on NetworkRelationshipUpdateFailed: %s != The update record operation for network relationship failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewNetworkRelationshipUpdateFailedError(errThingNotFound)
{
err2, ok := err2.(NetworkRelationshipUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on NetworkRelationshipUpdateFailed: %T is not NetworkRelationshipUpdateFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 67 {
t.Errorf("Assertion failed on NetworkRelationshipUpdateFailed: %d != 67", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on NetworkRelationshipUpdateFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on NetworkRelationshipUpdateFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, NetworkRelationshipUpdateFailedError{}) {
t.Errorf("Assertion failed on NetworkRelationshipUpdateFailed: NetworkRelationshipUpdateFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, NetworkRelationshipUpdateFailedError{}) {
t.Errorf("Assertion failed on NetworkRelationshipUpdateFailed: NetworkRelationshipUpdateFailedError{} not identified correctly")
}
if !errors.Is(err2, UpdateQueryFailedError{}) {
t.Errorf("Assertion failed on NetworkRelationshipUpdateFailed: UpdateQueryFailedError{} not identified correctly")
}
}
}
func TestNetworkRelationshipDeleteFailed (t *testing.T) {
err1 := NewNetworkRelationshipDeleteFailedError(nil)
{
err1, ok := err1.(NetworkRelationshipDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on NetworkRelationshipDeleteFailed: %T is not NetworkRelationshipDeleteFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on NetworkRelationshipDeleteFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 68 {
t.Errorf("Assertion failed on NetworkRelationshipDeleteFailed: %d != 68", err1.Code())
}
if err1.Description() != "The delete record operation for network relationship failed." {
t.Errorf("Assertion failed on NetworkRelationshipDeleteFailed: %s != The delete record operation for network relationship failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewNetworkRelationshipDeleteFailedError(errThingNotFound)
{
err2, ok := err2.(NetworkRelationshipDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on NetworkRelationshipDeleteFailed: %T is not NetworkRelationshipDeleteFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 68 {
t.Errorf("Assertion failed on NetworkRelationshipDeleteFailed: %d != 68", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on NetworkRelationshipDeleteFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on NetworkRelationshipDeleteFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, NetworkRelationshipDeleteFailedError{}) {
t.Errorf("Assertion failed on NetworkRelationshipDeleteFailed: NetworkRelationshipDeleteFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, NetworkRelationshipDeleteFailedError{}) {
t.Errorf("Assertion failed on NetworkRelationshipDeleteFailed: NetworkRelationshipDeleteFailedError{} not identified correctly")
}
if !errors.Is(err2, DeleteQueryFailedError{}) {
t.Errorf("Assertion failed on NetworkRelationshipDeleteFailed: DeleteQueryFailedError{} not identified correctly")
}
}
}
func TestInvalidNetworkRelationship (t *testing.T) {
err1 := NewInvalidNetworkRelationshipError(nil)
{
err1, ok := err1.(InvalidNetworkRelationshipError)
if !ok {
t.Errorf("Assertion failed on InvalidNetworkRelationship: %T is not InvalidNetworkRelationshipError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on InvalidNetworkRelationship: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 69 {
t.Errorf("Assertion failed on InvalidNetworkRelationship: %d != 69", err1.Code())
}
if err1.Description() != "The network relationship is invalid." {
t.Errorf("Assertion failed on InvalidNetworkRelationship: %s != The network relationship is invalid.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewInvalidNetworkRelationshipError(errThingNotFound)
{
err2, ok := err2.(InvalidNetworkRelationshipError)
if !ok {
t.Errorf("Assertion failed on InvalidNetworkRelationship: %T is not InvalidNetworkRelationshipError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 69 {
t.Errorf("Assertion failed on InvalidNetworkRelationship: %d != 69", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on InvalidNetworkRelationship: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on InvalidNetworkRelationship: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, InvalidNetworkRelationshipError{}) {
t.Errorf("Assertion failed on InvalidNetworkRelationship: InvalidNetworkRelationshipError{} not identified correctly")
}
if !errors.Is(errNestErr2, InvalidNetworkRelationshipError{}) {
t.Errorf("Assertion failed on InvalidNetworkRelationship: InvalidNetworkRelationshipError{} not identified correctly")
}
}
}
func TestNetworkRelationshipNotFound (t *testing.T) {
err1 := NewNetworkRelationshipNotFoundError(nil)
{
err1, ok := err1.(NetworkRelationshipNotFoundError)
if !ok {
t.Errorf("Assertion failed on NetworkRelationshipNotFound: %T is not NetworkRelationshipNotFoundError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on NetworkRelationshipNotFound: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 70 {
t.Errorf("Assertion failed on NetworkRelationshipNotFound: %d != 70", err1.Code())
}
if err1.Description() != "The network relationship was not found." {
t.Errorf("Assertion failed on NetworkRelationshipNotFound: %s != The network relationship was not found.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewNetworkRelationshipNotFoundError(errThingNotFound)
{
err2, ok := err2.(NetworkRelationshipNotFoundError)
if !ok {
t.Errorf("Assertion failed on NetworkRelationshipNotFound: %T is not NetworkRelationshipNotFoundError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 70 {
t.Errorf("Assertion failed on NetworkRelationshipNotFound: %d != 70", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on NetworkRelationshipNotFound: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on NetworkRelationshipNotFound: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, NetworkRelationshipNotFoundError{}) {
t.Errorf("Assertion failed on NetworkRelationshipNotFound: NetworkRelationshipNotFoundError{} not identified correctly")
}
if !errors.Is(errNestErr2, NetworkRelationshipNotFoundError{}) {
t.Errorf("Assertion failed on NetworkRelationshipNotFound: NetworkRelationshipNotFoundError{} not identified correctly")
}
if !errors.Is(err2, NotFoundError{}) {
t.Errorf("Assertion failed on NetworkRelationshipNotFound: NotFoundError{} not identified correctly")
}
}
}
func TestObjectQueryFailed (t *testing.T) {
err1 := NewObjectQueryFailedError(nil)
{
err1, ok := err1.(ObjectQueryFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectQueryFailed: %T is not ObjectQueryFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectQueryFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 71 {
t.Errorf("Assertion failed on ObjectQueryFailed: %d != 71", err1.Code())
}
if err1.Description() != "The object query failed." {
t.Errorf("Assertion failed on ObjectQueryFailed: %s != The object query failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectQueryFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectQueryFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectQueryFailed: %T is not ObjectQueryFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 71 {
t.Errorf("Assertion failed on ObjectQueryFailed: %d != 71", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectQueryFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectQueryFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectQueryFailed: ObjectQueryFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectQueryFailed: ObjectQueryFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on ObjectQueryFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestObjectSelectFailed (t *testing.T) {
err1 := NewObjectSelectFailedError(nil)
{
err1, ok := err1.(ObjectSelectFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectSelectFailed: %T is not ObjectSelectFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectSelectFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 72 {
t.Errorf("Assertion failed on ObjectSelectFailed: %d != 72", err1.Code())
}
if err1.Description() != "The select record operation for object failed." {
t.Errorf("Assertion failed on ObjectSelectFailed: %s != The select record operation for object failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectSelectFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectSelectFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectSelectFailed: %T is not ObjectSelectFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 72 {
t.Errorf("Assertion failed on ObjectSelectFailed: %d != 72", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectSelectFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectSelectFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectSelectFailedError{}) {
t.Errorf("Assertion failed on ObjectSelectFailed: ObjectSelectFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectSelectFailedError{}) {
t.Errorf("Assertion failed on ObjectSelectFailed: ObjectSelectFailedError{} not identified correctly")
}
if !errors.Is(err2, SelectQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectSelectFailed: SelectQueryFailedError{} not identified correctly")
}
}
}
func TestObjectInsertFailed (t *testing.T) {
err1 := NewObjectInsertFailedError(nil)
{
err1, ok := err1.(ObjectInsertFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectInsertFailed: %T is not ObjectInsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectInsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 73 {
t.Errorf("Assertion failed on ObjectInsertFailed: %d != 73", err1.Code())
}
if err1.Description() != "The insert record operation for object failed." {
t.Errorf("Assertion failed on ObjectInsertFailed: %s != The insert record operation for object failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectInsertFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectInsertFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectInsertFailed: %T is not ObjectInsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 73 {
t.Errorf("Assertion failed on ObjectInsertFailed: %d != 73", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectInsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectInsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectInsertFailedError{}) {
t.Errorf("Assertion failed on ObjectInsertFailed: ObjectInsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectInsertFailedError{}) {
t.Errorf("Assertion failed on ObjectInsertFailed: ObjectInsertFailedError{} not identified correctly")
}
if !errors.Is(err2, InsertQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectInsertFailed: InsertQueryFailedError{} not identified correctly")
}
}
}
func TestObjectUpsertFailed (t *testing.T) {
err1 := NewObjectUpsertFailedError(nil)
{
err1, ok := err1.(ObjectUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectUpsertFailed: %T is not ObjectUpsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectUpsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 74 {
t.Errorf("Assertion failed on ObjectUpsertFailed: %d != 74", err1.Code())
}
if err1.Description() != "The upsert record operation for object failed." {
t.Errorf("Assertion failed on ObjectUpsertFailed: %s != The upsert record operation for object failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectUpsertFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectUpsertFailed: %T is not ObjectUpsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 74 {
t.Errorf("Assertion failed on ObjectUpsertFailed: %d != 74", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectUpsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectUpsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectUpsertFailedError{}) {
t.Errorf("Assertion failed on ObjectUpsertFailed: ObjectUpsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectUpsertFailedError{}) {
t.Errorf("Assertion failed on ObjectUpsertFailed: ObjectUpsertFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on ObjectUpsertFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestObjectUpdateFailed (t *testing.T) {
err1 := NewObjectUpdateFailedError(nil)
{
err1, ok := err1.(ObjectUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectUpdateFailed: %T is not ObjectUpdateFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectUpdateFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 75 {
t.Errorf("Assertion failed on ObjectUpdateFailed: %d != 75", err1.Code())
}
if err1.Description() != "The update record operation for object failed." {
t.Errorf("Assertion failed on ObjectUpdateFailed: %s != The update record operation for object failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectUpdateFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectUpdateFailed: %T is not ObjectUpdateFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 75 {
t.Errorf("Assertion failed on ObjectUpdateFailed: %d != 75", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectUpdateFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectUpdateFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectUpdateFailedError{}) {
t.Errorf("Assertion failed on ObjectUpdateFailed: ObjectUpdateFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectUpdateFailedError{}) {
t.Errorf("Assertion failed on ObjectUpdateFailed: ObjectUpdateFailedError{} not identified correctly")
}
if !errors.Is(err2, UpdateQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectUpdateFailed: UpdateQueryFailedError{} not identified correctly")
}
}
}
func TestObjectDeleteFailed (t *testing.T) {
err1 := NewObjectDeleteFailedError(nil)
{
err1, ok := err1.(ObjectDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectDeleteFailed: %T is not ObjectDeleteFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectDeleteFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 76 {
t.Errorf("Assertion failed on ObjectDeleteFailed: %d != 76", err1.Code())
}
if err1.Description() != "The delete record operation for object failed." {
t.Errorf("Assertion failed on ObjectDeleteFailed: %s != The delete record operation for object failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectDeleteFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectDeleteFailed: %T is not ObjectDeleteFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 76 {
t.Errorf("Assertion failed on ObjectDeleteFailed: %d != 76", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectDeleteFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectDeleteFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectDeleteFailedError{}) {
t.Errorf("Assertion failed on ObjectDeleteFailed: ObjectDeleteFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectDeleteFailedError{}) {
t.Errorf("Assertion failed on ObjectDeleteFailed: ObjectDeleteFailedError{} not identified correctly")
}
if !errors.Is(err2, DeleteQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectDeleteFailed: DeleteQueryFailedError{} not identified correctly")
}
}
}
func TestInvalidObject (t *testing.T) {
err1 := NewInvalidObjectError(nil)
{
err1, ok := err1.(InvalidObjectError)
if !ok {
t.Errorf("Assertion failed on InvalidObject: %T is not InvalidObjectError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on InvalidObject: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 77 {
t.Errorf("Assertion failed on InvalidObject: %d != 77", err1.Code())
}
if err1.Description() != "The object is invalid." {
t.Errorf("Assertion failed on InvalidObject: %s != The object is invalid.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewInvalidObjectError(errThingNotFound)
{
err2, ok := err2.(InvalidObjectError)
if !ok {
t.Errorf("Assertion failed on InvalidObject: %T is not InvalidObjectError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 77 {
t.Errorf("Assertion failed on InvalidObject: %d != 77", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on InvalidObject: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on InvalidObject: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, InvalidObjectError{}) {
t.Errorf("Assertion failed on InvalidObject: InvalidObjectError{} not identified correctly")
}
if !errors.Is(errNestErr2, InvalidObjectError{}) {
t.Errorf("Assertion failed on InvalidObject: InvalidObjectError{} not identified correctly")
}
}
}
func TestObjectNotFound (t *testing.T) {
err1 := NewObjectNotFoundError(nil)
{
err1, ok := err1.(ObjectNotFoundError)
if !ok {
t.Errorf("Assertion failed on ObjectNotFound: %T is not ObjectNotFoundError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectNotFound: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 78 {
t.Errorf("Assertion failed on ObjectNotFound: %d != 78", err1.Code())
}
if err1.Description() != "The object was not found." {
t.Errorf("Assertion failed on ObjectNotFound: %s != The object was not found.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectNotFoundError(errThingNotFound)
{
err2, ok := err2.(ObjectNotFoundError)
if !ok {
t.Errorf("Assertion failed on ObjectNotFound: %T is not ObjectNotFoundError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 78 {
t.Errorf("Assertion failed on ObjectNotFound: %d != 78", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectNotFound: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectNotFound: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectNotFoundError{}) {
t.Errorf("Assertion failed on ObjectNotFound: ObjectNotFoundError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectNotFoundError{}) {
t.Errorf("Assertion failed on ObjectNotFound: ObjectNotFoundError{} not identified correctly")
}
if !errors.Is(err2, NotFoundError{}) {
t.Errorf("Assertion failed on ObjectNotFound: NotFoundError{} not identified correctly")
}
}
}
func TestObjectEventQueryFailed (t *testing.T) {
err1 := NewObjectEventQueryFailedError(nil)
{
err1, ok := err1.(ObjectEventQueryFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectEventQueryFailed: %T is not ObjectEventQueryFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectEventQueryFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 79 {
t.Errorf("Assertion failed on ObjectEventQueryFailed: %d != 79", err1.Code())
}
if err1.Description() != "The object event query failed." {
t.Errorf("Assertion failed on ObjectEventQueryFailed: %s != The object event query failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectEventQueryFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectEventQueryFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectEventQueryFailed: %T is not ObjectEventQueryFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 79 {
t.Errorf("Assertion failed on ObjectEventQueryFailed: %d != 79", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectEventQueryFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectEventQueryFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectEventQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectEventQueryFailed: ObjectEventQueryFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectEventQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectEventQueryFailed: ObjectEventQueryFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on ObjectEventQueryFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestObjectEventSelectFailed (t *testing.T) {
err1 := NewObjectEventSelectFailedError(nil)
{
err1, ok := err1.(ObjectEventSelectFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectEventSelectFailed: %T is not ObjectEventSelectFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectEventSelectFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 80 {
t.Errorf("Assertion failed on ObjectEventSelectFailed: %d != 80", err1.Code())
}
if err1.Description() != "The select record operation for object event failed." {
t.Errorf("Assertion failed on ObjectEventSelectFailed: %s != The select record operation for object event failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectEventSelectFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectEventSelectFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectEventSelectFailed: %T is not ObjectEventSelectFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 80 {
t.Errorf("Assertion failed on ObjectEventSelectFailed: %d != 80", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectEventSelectFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectEventSelectFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectEventSelectFailedError{}) {
t.Errorf("Assertion failed on ObjectEventSelectFailed: ObjectEventSelectFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectEventSelectFailedError{}) {
t.Errorf("Assertion failed on ObjectEventSelectFailed: ObjectEventSelectFailedError{} not identified correctly")
}
if !errors.Is(err2, SelectQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectEventSelectFailed: SelectQueryFailedError{} not identified correctly")
}
}
}
func TestObjectEventInsertFailed (t *testing.T) {
err1 := NewObjectEventInsertFailedError(nil)
{
err1, ok := err1.(ObjectEventInsertFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectEventInsertFailed: %T is not ObjectEventInsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectEventInsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 81 {
t.Errorf("Assertion failed on ObjectEventInsertFailed: %d != 81", err1.Code())
}
if err1.Description() != "The insert record operation for object event failed." {
t.Errorf("Assertion failed on ObjectEventInsertFailed: %s != The insert record operation for object event failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectEventInsertFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectEventInsertFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectEventInsertFailed: %T is not ObjectEventInsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 81 {
t.Errorf("Assertion failed on ObjectEventInsertFailed: %d != 81", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectEventInsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectEventInsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectEventInsertFailedError{}) {
t.Errorf("Assertion failed on ObjectEventInsertFailed: ObjectEventInsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectEventInsertFailedError{}) {
t.Errorf("Assertion failed on ObjectEventInsertFailed: ObjectEventInsertFailedError{} not identified correctly")
}
if !errors.Is(err2, InsertQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectEventInsertFailed: InsertQueryFailedError{} not identified correctly")
}
}
}
func TestObjectEventUpsertFailed (t *testing.T) {
err1 := NewObjectEventUpsertFailedError(nil)
{
err1, ok := err1.(ObjectEventUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectEventUpsertFailed: %T is not ObjectEventUpsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectEventUpsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 82 {
t.Errorf("Assertion failed on ObjectEventUpsertFailed: %d != 82", err1.Code())
}
if err1.Description() != "The upsert record operation for object event failed." {
t.Errorf("Assertion failed on ObjectEventUpsertFailed: %s != The upsert record operation for object event failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectEventUpsertFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectEventUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectEventUpsertFailed: %T is not ObjectEventUpsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 82 {
t.Errorf("Assertion failed on ObjectEventUpsertFailed: %d != 82", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectEventUpsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectEventUpsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectEventUpsertFailedError{}) {
t.Errorf("Assertion failed on ObjectEventUpsertFailed: ObjectEventUpsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectEventUpsertFailedError{}) {
t.Errorf("Assertion failed on ObjectEventUpsertFailed: ObjectEventUpsertFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on ObjectEventUpsertFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestObjectEventUpdateFailed (t *testing.T) {
err1 := NewObjectEventUpdateFailedError(nil)
{
err1, ok := err1.(ObjectEventUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectEventUpdateFailed: %T is not ObjectEventUpdateFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectEventUpdateFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 83 {
t.Errorf("Assertion failed on ObjectEventUpdateFailed: %d != 83", err1.Code())
}
if err1.Description() != "The update record operation for object event failed." {
t.Errorf("Assertion failed on ObjectEventUpdateFailed: %s != The update record operation for object event failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectEventUpdateFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectEventUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectEventUpdateFailed: %T is not ObjectEventUpdateFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 83 {
t.Errorf("Assertion failed on ObjectEventUpdateFailed: %d != 83", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectEventUpdateFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectEventUpdateFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectEventUpdateFailedError{}) {
t.Errorf("Assertion failed on ObjectEventUpdateFailed: ObjectEventUpdateFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectEventUpdateFailedError{}) {
t.Errorf("Assertion failed on ObjectEventUpdateFailed: ObjectEventUpdateFailedError{} not identified correctly")
}
if !errors.Is(err2, UpdateQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectEventUpdateFailed: UpdateQueryFailedError{} not identified correctly")
}
}
}
func TestObjectEventDeleteFailed (t *testing.T) {
err1 := NewObjectEventDeleteFailedError(nil)
{
err1, ok := err1.(ObjectEventDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectEventDeleteFailed: %T is not ObjectEventDeleteFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectEventDeleteFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 84 {
t.Errorf("Assertion failed on ObjectEventDeleteFailed: %d != 84", err1.Code())
}
if err1.Description() != "The delete record operation for object event failed." {
t.Errorf("Assertion failed on ObjectEventDeleteFailed: %s != The delete record operation for object event failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectEventDeleteFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectEventDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectEventDeleteFailed: %T is not ObjectEventDeleteFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 84 {
t.Errorf("Assertion failed on ObjectEventDeleteFailed: %d != 84", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectEventDeleteFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectEventDeleteFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectEventDeleteFailedError{}) {
t.Errorf("Assertion failed on ObjectEventDeleteFailed: ObjectEventDeleteFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectEventDeleteFailedError{}) {
t.Errorf("Assertion failed on ObjectEventDeleteFailed: ObjectEventDeleteFailedError{} not identified correctly")
}
if !errors.Is(err2, DeleteQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectEventDeleteFailed: DeleteQueryFailedError{} not identified correctly")
}
}
}
func TestInvalidObjectEvent (t *testing.T) {
err1 := NewInvalidObjectEventError(nil)
{
err1, ok := err1.(InvalidObjectEventError)
if !ok {
t.Errorf("Assertion failed on InvalidObjectEvent: %T is not InvalidObjectEventError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on InvalidObjectEvent: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 85 {
t.Errorf("Assertion failed on InvalidObjectEvent: %d != 85", err1.Code())
}
if err1.Description() != "The object event is invalid." {
t.Errorf("Assertion failed on InvalidObjectEvent: %s != The object event is invalid.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewInvalidObjectEventError(errThingNotFound)
{
err2, ok := err2.(InvalidObjectEventError)
if !ok {
t.Errorf("Assertion failed on InvalidObjectEvent: %T is not InvalidObjectEventError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 85 {
t.Errorf("Assertion failed on InvalidObjectEvent: %d != 85", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on InvalidObjectEvent: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on InvalidObjectEvent: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, InvalidObjectEventError{}) {
t.Errorf("Assertion failed on InvalidObjectEvent: InvalidObjectEventError{} not identified correctly")
}
if !errors.Is(errNestErr2, InvalidObjectEventError{}) {
t.Errorf("Assertion failed on InvalidObjectEvent: InvalidObjectEventError{} not identified correctly")
}
}
}
func TestObjectEventNotFound (t *testing.T) {
err1 := NewObjectEventNotFoundError(nil)
{
err1, ok := err1.(ObjectEventNotFoundError)
if !ok {
t.Errorf("Assertion failed on ObjectEventNotFound: %T is not ObjectEventNotFoundError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectEventNotFound: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 86 {
t.Errorf("Assertion failed on ObjectEventNotFound: %d != 86", err1.Code())
}
if err1.Description() != "The object event was not found." {
t.Errorf("Assertion failed on ObjectEventNotFound: %s != The object event was not found.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectEventNotFoundError(errThingNotFound)
{
err2, ok := err2.(ObjectEventNotFoundError)
if !ok {
t.Errorf("Assertion failed on ObjectEventNotFound: %T is not ObjectEventNotFoundError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 86 {
t.Errorf("Assertion failed on ObjectEventNotFound: %d != 86", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectEventNotFound: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectEventNotFound: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectEventNotFoundError{}) {
t.Errorf("Assertion failed on ObjectEventNotFound: ObjectEventNotFoundError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectEventNotFoundError{}) {
t.Errorf("Assertion failed on ObjectEventNotFound: ObjectEventNotFoundError{} not identified correctly")
}
if !errors.Is(err2, NotFoundError{}) {
t.Errorf("Assertion failed on ObjectEventNotFound: NotFoundError{} not identified correctly")
}
}
}
func TestObjectReplyQueryFailed (t *testing.T) {
err1 := NewObjectReplyQueryFailedError(nil)
{
err1, ok := err1.(ObjectReplyQueryFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectReplyQueryFailed: %T is not ObjectReplyQueryFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectReplyQueryFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 87 {
t.Errorf("Assertion failed on ObjectReplyQueryFailed: %d != 87", err1.Code())
}
if err1.Description() != "The object reply query failed." {
t.Errorf("Assertion failed on ObjectReplyQueryFailed: %s != The object reply query failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectReplyQueryFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectReplyQueryFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectReplyQueryFailed: %T is not ObjectReplyQueryFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 87 {
t.Errorf("Assertion failed on ObjectReplyQueryFailed: %d != 87", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectReplyQueryFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectReplyQueryFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectReplyQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectReplyQueryFailed: ObjectReplyQueryFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectReplyQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectReplyQueryFailed: ObjectReplyQueryFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on ObjectReplyQueryFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestObjectReplySelectFailed (t *testing.T) {
err1 := NewObjectReplySelectFailedError(nil)
{
err1, ok := err1.(ObjectReplySelectFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectReplySelectFailed: %T is not ObjectReplySelectFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectReplySelectFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 88 {
t.Errorf("Assertion failed on ObjectReplySelectFailed: %d != 88", err1.Code())
}
if err1.Description() != "The select record operation for object reply failed." {
t.Errorf("Assertion failed on ObjectReplySelectFailed: %s != The select record operation for object reply failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectReplySelectFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectReplySelectFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectReplySelectFailed: %T is not ObjectReplySelectFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 88 {
t.Errorf("Assertion failed on ObjectReplySelectFailed: %d != 88", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectReplySelectFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectReplySelectFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectReplySelectFailedError{}) {
t.Errorf("Assertion failed on ObjectReplySelectFailed: ObjectReplySelectFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectReplySelectFailedError{}) {
t.Errorf("Assertion failed on ObjectReplySelectFailed: ObjectReplySelectFailedError{} not identified correctly")
}
if !errors.Is(err2, SelectQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectReplySelectFailed: SelectQueryFailedError{} not identified correctly")
}
}
}
func TestObjectReplyInsertFailed (t *testing.T) {
err1 := NewObjectReplyInsertFailedError(nil)
{
err1, ok := err1.(ObjectReplyInsertFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectReplyInsertFailed: %T is not ObjectReplyInsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectReplyInsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 89 {
t.Errorf("Assertion failed on ObjectReplyInsertFailed: %d != 89", err1.Code())
}
if err1.Description() != "The insert record operation for object reply failed." {
t.Errorf("Assertion failed on ObjectReplyInsertFailed: %s != The insert record operation for object reply failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectReplyInsertFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectReplyInsertFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectReplyInsertFailed: %T is not ObjectReplyInsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 89 {
t.Errorf("Assertion failed on ObjectReplyInsertFailed: %d != 89", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectReplyInsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectReplyInsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectReplyInsertFailedError{}) {
t.Errorf("Assertion failed on ObjectReplyInsertFailed: ObjectReplyInsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectReplyInsertFailedError{}) {
t.Errorf("Assertion failed on ObjectReplyInsertFailed: ObjectReplyInsertFailedError{} not identified correctly")
}
if !errors.Is(err2, InsertQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectReplyInsertFailed: InsertQueryFailedError{} not identified correctly")
}
}
}
func TestObjectReplyUpsertFailed (t *testing.T) {
err1 := NewObjectReplyUpsertFailedError(nil)
{
err1, ok := err1.(ObjectReplyUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectReplyUpsertFailed: %T is not ObjectReplyUpsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectReplyUpsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 90 {
t.Errorf("Assertion failed on ObjectReplyUpsertFailed: %d != 90", err1.Code())
}
if err1.Description() != "The upsert record operation for object reply failed." {
t.Errorf("Assertion failed on ObjectReplyUpsertFailed: %s != The upsert record operation for object reply failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectReplyUpsertFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectReplyUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectReplyUpsertFailed: %T is not ObjectReplyUpsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 90 {
t.Errorf("Assertion failed on ObjectReplyUpsertFailed: %d != 90", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectReplyUpsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectReplyUpsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectReplyUpsertFailedError{}) {
t.Errorf("Assertion failed on ObjectReplyUpsertFailed: ObjectReplyUpsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectReplyUpsertFailedError{}) {
t.Errorf("Assertion failed on ObjectReplyUpsertFailed: ObjectReplyUpsertFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on ObjectReplyUpsertFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestObjectReplyUpdateFailed (t *testing.T) {
err1 := NewObjectReplyUpdateFailedError(nil)
{
err1, ok := err1.(ObjectReplyUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectReplyUpdateFailed: %T is not ObjectReplyUpdateFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectReplyUpdateFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 91 {
t.Errorf("Assertion failed on ObjectReplyUpdateFailed: %d != 91", err1.Code())
}
if err1.Description() != "The update record operation for object reply failed." {
t.Errorf("Assertion failed on ObjectReplyUpdateFailed: %s != The update record operation for object reply failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectReplyUpdateFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectReplyUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectReplyUpdateFailed: %T is not ObjectReplyUpdateFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 91 {
t.Errorf("Assertion failed on ObjectReplyUpdateFailed: %d != 91", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectReplyUpdateFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectReplyUpdateFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectReplyUpdateFailedError{}) {
t.Errorf("Assertion failed on ObjectReplyUpdateFailed: ObjectReplyUpdateFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectReplyUpdateFailedError{}) {
t.Errorf("Assertion failed on ObjectReplyUpdateFailed: ObjectReplyUpdateFailedError{} not identified correctly")
}
if !errors.Is(err2, UpdateQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectReplyUpdateFailed: UpdateQueryFailedError{} not identified correctly")
}
}
}
func TestObjectReplyDeleteFailed (t *testing.T) {
err1 := NewObjectReplyDeleteFailedError(nil)
{
err1, ok := err1.(ObjectReplyDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectReplyDeleteFailed: %T is not ObjectReplyDeleteFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectReplyDeleteFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 92 {
t.Errorf("Assertion failed on ObjectReplyDeleteFailed: %d != 92", err1.Code())
}
if err1.Description() != "The delete record operation for object reply failed." {
t.Errorf("Assertion failed on ObjectReplyDeleteFailed: %s != The delete record operation for object reply failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectReplyDeleteFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectReplyDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectReplyDeleteFailed: %T is not ObjectReplyDeleteFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 92 {
t.Errorf("Assertion failed on ObjectReplyDeleteFailed: %d != 92", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectReplyDeleteFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectReplyDeleteFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectReplyDeleteFailedError{}) {
t.Errorf("Assertion failed on ObjectReplyDeleteFailed: ObjectReplyDeleteFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectReplyDeleteFailedError{}) {
t.Errorf("Assertion failed on ObjectReplyDeleteFailed: ObjectReplyDeleteFailedError{} not identified correctly")
}
if !errors.Is(err2, DeleteQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectReplyDeleteFailed: DeleteQueryFailedError{} not identified correctly")
}
}
}
func TestInvalidObjectReply (t *testing.T) {
err1 := NewInvalidObjectReplyError(nil)
{
err1, ok := err1.(InvalidObjectReplyError)
if !ok {
t.Errorf("Assertion failed on InvalidObjectReply: %T is not InvalidObjectReplyError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on InvalidObjectReply: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 93 {
t.Errorf("Assertion failed on InvalidObjectReply: %d != 93", err1.Code())
}
if err1.Description() != "The object reply is invalid." {
t.Errorf("Assertion failed on InvalidObjectReply: %s != The object reply is invalid.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewInvalidObjectReplyError(errThingNotFound)
{
err2, ok := err2.(InvalidObjectReplyError)
if !ok {
t.Errorf("Assertion failed on InvalidObjectReply: %T is not InvalidObjectReplyError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 93 {
t.Errorf("Assertion failed on InvalidObjectReply: %d != 93", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on InvalidObjectReply: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on InvalidObjectReply: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, InvalidObjectReplyError{}) {
t.Errorf("Assertion failed on InvalidObjectReply: InvalidObjectReplyError{} not identified correctly")
}
if !errors.Is(errNestErr2, InvalidObjectReplyError{}) {
t.Errorf("Assertion failed on InvalidObjectReply: InvalidObjectReplyError{} not identified correctly")
}
}
}
func TestObjectReplyNotFound (t *testing.T) {
err1 := NewObjectReplyNotFoundError(nil)
{
err1, ok := err1.(ObjectReplyNotFoundError)
if !ok {
t.Errorf("Assertion failed on ObjectReplyNotFound: %T is not ObjectReplyNotFoundError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectReplyNotFound: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 94 {
t.Errorf("Assertion failed on ObjectReplyNotFound: %d != 94", err1.Code())
}
if err1.Description() != "The object reply was not found." {
t.Errorf("Assertion failed on ObjectReplyNotFound: %s != The object reply was not found.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectReplyNotFoundError(errThingNotFound)
{
err2, ok := err2.(ObjectReplyNotFoundError)
if !ok {
t.Errorf("Assertion failed on ObjectReplyNotFound: %T is not ObjectReplyNotFoundError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 94 {
t.Errorf("Assertion failed on ObjectReplyNotFound: %d != 94", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectReplyNotFound: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectReplyNotFound: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectReplyNotFoundError{}) {
t.Errorf("Assertion failed on ObjectReplyNotFound: ObjectReplyNotFoundError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectReplyNotFoundError{}) {
t.Errorf("Assertion failed on ObjectReplyNotFound: ObjectReplyNotFoundError{} not identified correctly")
}
if !errors.Is(err2, NotFoundError{}) {
t.Errorf("Assertion failed on ObjectReplyNotFound: NotFoundError{} not identified correctly")
}
}
}
func TestObjectTagQueryFailed (t *testing.T) {
err1 := NewObjectTagQueryFailedError(nil)
{
err1, ok := err1.(ObjectTagQueryFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectTagQueryFailed: %T is not ObjectTagQueryFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectTagQueryFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 95 {
t.Errorf("Assertion failed on ObjectTagQueryFailed: %d != 95", err1.Code())
}
if err1.Description() != "The object tag query failed." {
t.Errorf("Assertion failed on ObjectTagQueryFailed: %s != The object tag query failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectTagQueryFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectTagQueryFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectTagQueryFailed: %T is not ObjectTagQueryFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 95 {
t.Errorf("Assertion failed on ObjectTagQueryFailed: %d != 95", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectTagQueryFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectTagQueryFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectTagQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectTagQueryFailed: ObjectTagQueryFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectTagQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectTagQueryFailed: ObjectTagQueryFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on ObjectTagQueryFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestObjectTagSelectFailed (t *testing.T) {
err1 := NewObjectTagSelectFailedError(nil)
{
err1, ok := err1.(ObjectTagSelectFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectTagSelectFailed: %T is not ObjectTagSelectFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectTagSelectFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 96 {
t.Errorf("Assertion failed on ObjectTagSelectFailed: %d != 96", err1.Code())
}
if err1.Description() != "The select record operation for object tag failed." {
t.Errorf("Assertion failed on ObjectTagSelectFailed: %s != The select record operation for object tag failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectTagSelectFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectTagSelectFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectTagSelectFailed: %T is not ObjectTagSelectFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 96 {
t.Errorf("Assertion failed on ObjectTagSelectFailed: %d != 96", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectTagSelectFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectTagSelectFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectTagSelectFailedError{}) {
t.Errorf("Assertion failed on ObjectTagSelectFailed: ObjectTagSelectFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectTagSelectFailedError{}) {
t.Errorf("Assertion failed on ObjectTagSelectFailed: ObjectTagSelectFailedError{} not identified correctly")
}
if !errors.Is(err2, SelectQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectTagSelectFailed: SelectQueryFailedError{} not identified correctly")
}
}
}
func TestObjectTagInsertFailed (t *testing.T) {
err1 := NewObjectTagInsertFailedError(nil)
{
err1, ok := err1.(ObjectTagInsertFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectTagInsertFailed: %T is not ObjectTagInsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectTagInsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 97 {
t.Errorf("Assertion failed on ObjectTagInsertFailed: %d != 97", err1.Code())
}
if err1.Description() != "The insert record operation for object tag failed." {
t.Errorf("Assertion failed on ObjectTagInsertFailed: %s != The insert record operation for object tag failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectTagInsertFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectTagInsertFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectTagInsertFailed: %T is not ObjectTagInsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 97 {
t.Errorf("Assertion failed on ObjectTagInsertFailed: %d != 97", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectTagInsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectTagInsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectTagInsertFailedError{}) {
t.Errorf("Assertion failed on ObjectTagInsertFailed: ObjectTagInsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectTagInsertFailedError{}) {
t.Errorf("Assertion failed on ObjectTagInsertFailed: ObjectTagInsertFailedError{} not identified correctly")
}
if !errors.Is(err2, InsertQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectTagInsertFailed: InsertQueryFailedError{} not identified correctly")
}
}
}
func TestObjectTagUpsertFailed (t *testing.T) {
err1 := NewObjectTagUpsertFailedError(nil)
{
err1, ok := err1.(ObjectTagUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectTagUpsertFailed: %T is not ObjectTagUpsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectTagUpsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 98 {
t.Errorf("Assertion failed on ObjectTagUpsertFailed: %d != 98", err1.Code())
}
if err1.Description() != "The upsert record operation for object tag failed." {
t.Errorf("Assertion failed on ObjectTagUpsertFailed: %s != The upsert record operation for object tag failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectTagUpsertFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectTagUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectTagUpsertFailed: %T is not ObjectTagUpsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 98 {
t.Errorf("Assertion failed on ObjectTagUpsertFailed: %d != 98", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectTagUpsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectTagUpsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectTagUpsertFailedError{}) {
t.Errorf("Assertion failed on ObjectTagUpsertFailed: ObjectTagUpsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectTagUpsertFailedError{}) {
t.Errorf("Assertion failed on ObjectTagUpsertFailed: ObjectTagUpsertFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on ObjectTagUpsertFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestObjectTagUpdateFailed (t *testing.T) {
err1 := NewObjectTagUpdateFailedError(nil)
{
err1, ok := err1.(ObjectTagUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectTagUpdateFailed: %T is not ObjectTagUpdateFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectTagUpdateFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 99 {
t.Errorf("Assertion failed on ObjectTagUpdateFailed: %d != 99", err1.Code())
}
if err1.Description() != "The update record operation for object tag failed." {
t.Errorf("Assertion failed on ObjectTagUpdateFailed: %s != The update record operation for object tag failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectTagUpdateFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectTagUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectTagUpdateFailed: %T is not ObjectTagUpdateFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 99 {
t.Errorf("Assertion failed on ObjectTagUpdateFailed: %d != 99", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectTagUpdateFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectTagUpdateFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectTagUpdateFailedError{}) {
t.Errorf("Assertion failed on ObjectTagUpdateFailed: ObjectTagUpdateFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectTagUpdateFailedError{}) {
t.Errorf("Assertion failed on ObjectTagUpdateFailed: ObjectTagUpdateFailedError{} not identified correctly")
}
if !errors.Is(err2, UpdateQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectTagUpdateFailed: UpdateQueryFailedError{} not identified correctly")
}
}
}
func TestObjectTagDeleteFailed (t *testing.T) {
err1 := NewObjectTagDeleteFailedError(nil)
{
err1, ok := err1.(ObjectTagDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectTagDeleteFailed: %T is not ObjectTagDeleteFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectTagDeleteFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 100 {
t.Errorf("Assertion failed on ObjectTagDeleteFailed: %d != 100", err1.Code())
}
if err1.Description() != "The delete record operation for object tag failed." {
t.Errorf("Assertion failed on ObjectTagDeleteFailed: %s != The delete record operation for object tag failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectTagDeleteFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectTagDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectTagDeleteFailed: %T is not ObjectTagDeleteFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 100 {
t.Errorf("Assertion failed on ObjectTagDeleteFailed: %d != 100", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectTagDeleteFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectTagDeleteFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectTagDeleteFailedError{}) {
t.Errorf("Assertion failed on ObjectTagDeleteFailed: ObjectTagDeleteFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectTagDeleteFailedError{}) {
t.Errorf("Assertion failed on ObjectTagDeleteFailed: ObjectTagDeleteFailedError{} not identified correctly")
}
if !errors.Is(err2, DeleteQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectTagDeleteFailed: DeleteQueryFailedError{} not identified correctly")
}
}
}
func TestInvalidObjectTag (t *testing.T) {
err1 := NewInvalidObjectTagError(nil)
{
err1, ok := err1.(InvalidObjectTagError)
if !ok {
t.Errorf("Assertion failed on InvalidObjectTag: %T is not InvalidObjectTagError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on InvalidObjectTag: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 101 {
t.Errorf("Assertion failed on InvalidObjectTag: %d != 101", err1.Code())
}
if err1.Description() != "The object tag is invalid." {
t.Errorf("Assertion failed on InvalidObjectTag: %s != The object tag is invalid.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewInvalidObjectTagError(errThingNotFound)
{
err2, ok := err2.(InvalidObjectTagError)
if !ok {
t.Errorf("Assertion failed on InvalidObjectTag: %T is not InvalidObjectTagError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 101 {
t.Errorf("Assertion failed on InvalidObjectTag: %d != 101", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on InvalidObjectTag: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on InvalidObjectTag: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, InvalidObjectTagError{}) {
t.Errorf("Assertion failed on InvalidObjectTag: InvalidObjectTagError{} not identified correctly")
}
if !errors.Is(errNestErr2, InvalidObjectTagError{}) {
t.Errorf("Assertion failed on InvalidObjectTag: InvalidObjectTagError{} not identified correctly")
}
}
}
func TestObjectTagNotFound (t *testing.T) {
err1 := NewObjectTagNotFoundError(nil)
{
err1, ok := err1.(ObjectTagNotFoundError)
if !ok {
t.Errorf("Assertion failed on ObjectTagNotFound: %T is not ObjectTagNotFoundError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectTagNotFound: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 102 {
t.Errorf("Assertion failed on ObjectTagNotFound: %d != 102", err1.Code())
}
if err1.Description() != "The object tag was not found." {
t.Errorf("Assertion failed on ObjectTagNotFound: %s != The object tag was not found.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectTagNotFoundError(errThingNotFound)
{
err2, ok := err2.(ObjectTagNotFoundError)
if !ok {
t.Errorf("Assertion failed on ObjectTagNotFound: %T is not ObjectTagNotFoundError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 102 {
t.Errorf("Assertion failed on ObjectTagNotFound: %d != 102", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectTagNotFound: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectTagNotFound: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectTagNotFoundError{}) {
t.Errorf("Assertion failed on ObjectTagNotFound: ObjectTagNotFoundError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectTagNotFoundError{}) {
t.Errorf("Assertion failed on ObjectTagNotFound: ObjectTagNotFoundError{} not identified correctly")
}
if !errors.Is(err2, NotFoundError{}) {
t.Errorf("Assertion failed on ObjectTagNotFound: NotFoundError{} not identified correctly")
}
}
}
func TestObjectThreadQueryFailed (t *testing.T) {
err1 := NewObjectThreadQueryFailedError(nil)
{
err1, ok := err1.(ObjectThreadQueryFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectThreadQueryFailed: %T is not ObjectThreadQueryFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectThreadQueryFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 103 {
t.Errorf("Assertion failed on ObjectThreadQueryFailed: %d != 103", err1.Code())
}
if err1.Description() != "The object thread query failed." {
t.Errorf("Assertion failed on ObjectThreadQueryFailed: %s != The object thread query failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectThreadQueryFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectThreadQueryFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectThreadQueryFailed: %T is not ObjectThreadQueryFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 103 {
t.Errorf("Assertion failed on ObjectThreadQueryFailed: %d != 103", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectThreadQueryFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectThreadQueryFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectThreadQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectThreadQueryFailed: ObjectThreadQueryFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectThreadQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectThreadQueryFailed: ObjectThreadQueryFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on ObjectThreadQueryFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestObjectThreadSelectFailed (t *testing.T) {
err1 := NewObjectThreadSelectFailedError(nil)
{
err1, ok := err1.(ObjectThreadSelectFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectThreadSelectFailed: %T is not ObjectThreadSelectFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectThreadSelectFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 104 {
t.Errorf("Assertion failed on ObjectThreadSelectFailed: %d != 104", err1.Code())
}
if err1.Description() != "The select record operation for object thread failed." {
t.Errorf("Assertion failed on ObjectThreadSelectFailed: %s != The select record operation for object thread failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectThreadSelectFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectThreadSelectFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectThreadSelectFailed: %T is not ObjectThreadSelectFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 104 {
t.Errorf("Assertion failed on ObjectThreadSelectFailed: %d != 104", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectThreadSelectFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectThreadSelectFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectThreadSelectFailedError{}) {
t.Errorf("Assertion failed on ObjectThreadSelectFailed: ObjectThreadSelectFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectThreadSelectFailedError{}) {
t.Errorf("Assertion failed on ObjectThreadSelectFailed: ObjectThreadSelectFailedError{} not identified correctly")
}
if !errors.Is(err2, SelectQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectThreadSelectFailed: SelectQueryFailedError{} not identified correctly")
}
}
}
func TestObjectThreadInsertFailed (t *testing.T) {
err1 := NewObjectThreadInsertFailedError(nil)
{
err1, ok := err1.(ObjectThreadInsertFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectThreadInsertFailed: %T is not ObjectThreadInsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectThreadInsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 105 {
t.Errorf("Assertion failed on ObjectThreadInsertFailed: %d != 105", err1.Code())
}
if err1.Description() != "The insert record operation for object thread failed." {
t.Errorf("Assertion failed on ObjectThreadInsertFailed: %s != The insert record operation for object thread failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectThreadInsertFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectThreadInsertFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectThreadInsertFailed: %T is not ObjectThreadInsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 105 {
t.Errorf("Assertion failed on ObjectThreadInsertFailed: %d != 105", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectThreadInsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectThreadInsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectThreadInsertFailedError{}) {
t.Errorf("Assertion failed on ObjectThreadInsertFailed: ObjectThreadInsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectThreadInsertFailedError{}) {
t.Errorf("Assertion failed on ObjectThreadInsertFailed: ObjectThreadInsertFailedError{} not identified correctly")
}
if !errors.Is(err2, InsertQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectThreadInsertFailed: InsertQueryFailedError{} not identified correctly")
}
}
}
func TestObjectThreadUpsertFailed (t *testing.T) {
err1 := NewObjectThreadUpsertFailedError(nil)
{
err1, ok := err1.(ObjectThreadUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectThreadUpsertFailed: %T is not ObjectThreadUpsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectThreadUpsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 106 {
t.Errorf("Assertion failed on ObjectThreadUpsertFailed: %d != 106", err1.Code())
}
if err1.Description() != "The upsert record operation for object thread failed." {
t.Errorf("Assertion failed on ObjectThreadUpsertFailed: %s != The upsert record operation for object thread failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectThreadUpsertFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectThreadUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectThreadUpsertFailed: %T is not ObjectThreadUpsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 106 {
t.Errorf("Assertion failed on ObjectThreadUpsertFailed: %d != 106", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectThreadUpsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectThreadUpsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectThreadUpsertFailedError{}) {
t.Errorf("Assertion failed on ObjectThreadUpsertFailed: ObjectThreadUpsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectThreadUpsertFailedError{}) {
t.Errorf("Assertion failed on ObjectThreadUpsertFailed: ObjectThreadUpsertFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on ObjectThreadUpsertFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestObjectThreadUpdateFailed (t *testing.T) {
err1 := NewObjectThreadUpdateFailedError(nil)
{
err1, ok := err1.(ObjectThreadUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectThreadUpdateFailed: %T is not ObjectThreadUpdateFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectThreadUpdateFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 107 {
t.Errorf("Assertion failed on ObjectThreadUpdateFailed: %d != 107", err1.Code())
}
if err1.Description() != "The update record operation for object thread failed." {
t.Errorf("Assertion failed on ObjectThreadUpdateFailed: %s != The update record operation for object thread failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectThreadUpdateFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectThreadUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectThreadUpdateFailed: %T is not ObjectThreadUpdateFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 107 {
t.Errorf("Assertion failed on ObjectThreadUpdateFailed: %d != 107", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectThreadUpdateFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectThreadUpdateFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectThreadUpdateFailedError{}) {
t.Errorf("Assertion failed on ObjectThreadUpdateFailed: ObjectThreadUpdateFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectThreadUpdateFailedError{}) {
t.Errorf("Assertion failed on ObjectThreadUpdateFailed: ObjectThreadUpdateFailedError{} not identified correctly")
}
if !errors.Is(err2, UpdateQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectThreadUpdateFailed: UpdateQueryFailedError{} not identified correctly")
}
}
}
func TestObjectThreadDeleteFailed (t *testing.T) {
err1 := NewObjectThreadDeleteFailedError(nil)
{
err1, ok := err1.(ObjectThreadDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectThreadDeleteFailed: %T is not ObjectThreadDeleteFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectThreadDeleteFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 108 {
t.Errorf("Assertion failed on ObjectThreadDeleteFailed: %d != 108", err1.Code())
}
if err1.Description() != "The delete record operation for object thread failed." {
t.Errorf("Assertion failed on ObjectThreadDeleteFailed: %s != The delete record operation for object thread failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectThreadDeleteFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectThreadDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectThreadDeleteFailed: %T is not ObjectThreadDeleteFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 108 {
t.Errorf("Assertion failed on ObjectThreadDeleteFailed: %d != 108", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectThreadDeleteFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectThreadDeleteFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectThreadDeleteFailedError{}) {
t.Errorf("Assertion failed on ObjectThreadDeleteFailed: ObjectThreadDeleteFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectThreadDeleteFailedError{}) {
t.Errorf("Assertion failed on ObjectThreadDeleteFailed: ObjectThreadDeleteFailedError{} not identified correctly")
}
if !errors.Is(err2, DeleteQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectThreadDeleteFailed: DeleteQueryFailedError{} not identified correctly")
}
}
}
func TestInvalidObjectThread (t *testing.T) {
err1 := NewInvalidObjectThreadError(nil)
{
err1, ok := err1.(InvalidObjectThreadError)
if !ok {
t.Errorf("Assertion failed on InvalidObjectThread: %T is not InvalidObjectThreadError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on InvalidObjectThread: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 109 {
t.Errorf("Assertion failed on InvalidObjectThread: %d != 109", err1.Code())
}
if err1.Description() != "The object thread is invalid." {
t.Errorf("Assertion failed on InvalidObjectThread: %s != The object thread is invalid.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewInvalidObjectThreadError(errThingNotFound)
{
err2, ok := err2.(InvalidObjectThreadError)
if !ok {
t.Errorf("Assertion failed on InvalidObjectThread: %T is not InvalidObjectThreadError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 109 {
t.Errorf("Assertion failed on InvalidObjectThread: %d != 109", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on InvalidObjectThread: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on InvalidObjectThread: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, InvalidObjectThreadError{}) {
t.Errorf("Assertion failed on InvalidObjectThread: InvalidObjectThreadError{} not identified correctly")
}
if !errors.Is(errNestErr2, InvalidObjectThreadError{}) {
t.Errorf("Assertion failed on InvalidObjectThread: InvalidObjectThreadError{} not identified correctly")
}
}
}
func TestObjectThreadNotFound (t *testing.T) {
err1 := NewObjectThreadNotFoundError(nil)
{
err1, ok := err1.(ObjectThreadNotFoundError)
if !ok {
t.Errorf("Assertion failed on ObjectThreadNotFound: %T is not ObjectThreadNotFoundError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectThreadNotFound: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 110 {
t.Errorf("Assertion failed on ObjectThreadNotFound: %d != 110", err1.Code())
}
if err1.Description() != "The object thread was not found." {
t.Errorf("Assertion failed on ObjectThreadNotFound: %s != The object thread was not found.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectThreadNotFoundError(errThingNotFound)
{
err2, ok := err2.(ObjectThreadNotFoundError)
if !ok {
t.Errorf("Assertion failed on ObjectThreadNotFound: %T is not ObjectThreadNotFoundError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 110 {
t.Errorf("Assertion failed on ObjectThreadNotFound: %d != 110", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectThreadNotFound: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectThreadNotFound: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectThreadNotFoundError{}) {
t.Errorf("Assertion failed on ObjectThreadNotFound: ObjectThreadNotFoundError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectThreadNotFoundError{}) {
t.Errorf("Assertion failed on ObjectThreadNotFound: ObjectThreadNotFoundError{} not identified correctly")
}
if !errors.Is(err2, NotFoundError{}) {
t.Errorf("Assertion failed on ObjectThreadNotFound: NotFoundError{} not identified correctly")
}
}
}
func TestObjectBoostQueryFailed (t *testing.T) {
err1 := NewObjectBoostQueryFailedError(nil)
{
err1, ok := err1.(ObjectBoostQueryFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectBoostQueryFailed: %T is not ObjectBoostQueryFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectBoostQueryFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 111 {
t.Errorf("Assertion failed on ObjectBoostQueryFailed: %d != 111", err1.Code())
}
if err1.Description() != "The object boost query failed." {
t.Errorf("Assertion failed on ObjectBoostQueryFailed: %s != The object boost query failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectBoostQueryFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectBoostQueryFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectBoostQueryFailed: %T is not ObjectBoostQueryFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 111 {
t.Errorf("Assertion failed on ObjectBoostQueryFailed: %d != 111", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectBoostQueryFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectBoostQueryFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectBoostQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectBoostQueryFailed: ObjectBoostQueryFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectBoostQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectBoostQueryFailed: ObjectBoostQueryFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on ObjectBoostQueryFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestObjectBoostSelectFailed (t *testing.T) {
err1 := NewObjectBoostSelectFailedError(nil)
{
err1, ok := err1.(ObjectBoostSelectFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectBoostSelectFailed: %T is not ObjectBoostSelectFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectBoostSelectFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 112 {
t.Errorf("Assertion failed on ObjectBoostSelectFailed: %d != 112", err1.Code())
}
if err1.Description() != "The select record operation for object boost failed." {
t.Errorf("Assertion failed on ObjectBoostSelectFailed: %s != The select record operation for object boost failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectBoostSelectFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectBoostSelectFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectBoostSelectFailed: %T is not ObjectBoostSelectFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 112 {
t.Errorf("Assertion failed on ObjectBoostSelectFailed: %d != 112", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectBoostSelectFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectBoostSelectFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectBoostSelectFailedError{}) {
t.Errorf("Assertion failed on ObjectBoostSelectFailed: ObjectBoostSelectFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectBoostSelectFailedError{}) {
t.Errorf("Assertion failed on ObjectBoostSelectFailed: ObjectBoostSelectFailedError{} not identified correctly")
}
if !errors.Is(err2, SelectQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectBoostSelectFailed: SelectQueryFailedError{} not identified correctly")
}
}
}
func TestObjectBoostInsertFailed (t *testing.T) {
err1 := NewObjectBoostInsertFailedError(nil)
{
err1, ok := err1.(ObjectBoostInsertFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectBoostInsertFailed: %T is not ObjectBoostInsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectBoostInsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 113 {
t.Errorf("Assertion failed on ObjectBoostInsertFailed: %d != 113", err1.Code())
}
if err1.Description() != "The insert record operation for object boost failed." {
t.Errorf("Assertion failed on ObjectBoostInsertFailed: %s != The insert record operation for object boost failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectBoostInsertFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectBoostInsertFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectBoostInsertFailed: %T is not ObjectBoostInsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 113 {
t.Errorf("Assertion failed on ObjectBoostInsertFailed: %d != 113", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectBoostInsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectBoostInsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectBoostInsertFailedError{}) {
t.Errorf("Assertion failed on ObjectBoostInsertFailed: ObjectBoostInsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectBoostInsertFailedError{}) {
t.Errorf("Assertion failed on ObjectBoostInsertFailed: ObjectBoostInsertFailedError{} not identified correctly")
}
if !errors.Is(err2, InsertQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectBoostInsertFailed: InsertQueryFailedError{} not identified correctly")
}
}
}
func TestObjectBoostUpsertFailed (t *testing.T) {
err1 := NewObjectBoostUpsertFailedError(nil)
{
err1, ok := err1.(ObjectBoostUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectBoostUpsertFailed: %T is not ObjectBoostUpsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectBoostUpsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 114 {
t.Errorf("Assertion failed on ObjectBoostUpsertFailed: %d != 114", err1.Code())
}
if err1.Description() != "The upsert record operation for object boost failed." {
t.Errorf("Assertion failed on ObjectBoostUpsertFailed: %s != The upsert record operation for object boost failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectBoostUpsertFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectBoostUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectBoostUpsertFailed: %T is not ObjectBoostUpsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 114 {
t.Errorf("Assertion failed on ObjectBoostUpsertFailed: %d != 114", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectBoostUpsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectBoostUpsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectBoostUpsertFailedError{}) {
t.Errorf("Assertion failed on ObjectBoostUpsertFailed: ObjectBoostUpsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectBoostUpsertFailedError{}) {
t.Errorf("Assertion failed on ObjectBoostUpsertFailed: ObjectBoostUpsertFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on ObjectBoostUpsertFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestObjectBoostUpdateFailed (t *testing.T) {
err1 := NewObjectBoostUpdateFailedError(nil)
{
err1, ok := err1.(ObjectBoostUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectBoostUpdateFailed: %T is not ObjectBoostUpdateFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectBoostUpdateFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 115 {
t.Errorf("Assertion failed on ObjectBoostUpdateFailed: %d != 115", err1.Code())
}
if err1.Description() != "The update record operation for object boost failed." {
t.Errorf("Assertion failed on ObjectBoostUpdateFailed: %s != The update record operation for object boost failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectBoostUpdateFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectBoostUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectBoostUpdateFailed: %T is not ObjectBoostUpdateFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 115 {
t.Errorf("Assertion failed on ObjectBoostUpdateFailed: %d != 115", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectBoostUpdateFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectBoostUpdateFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectBoostUpdateFailedError{}) {
t.Errorf("Assertion failed on ObjectBoostUpdateFailed: ObjectBoostUpdateFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectBoostUpdateFailedError{}) {
t.Errorf("Assertion failed on ObjectBoostUpdateFailed: ObjectBoostUpdateFailedError{} not identified correctly")
}
if !errors.Is(err2, UpdateQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectBoostUpdateFailed: UpdateQueryFailedError{} not identified correctly")
}
}
}
func TestObjectBoostDeleteFailed (t *testing.T) {
err1 := NewObjectBoostDeleteFailedError(nil)
{
err1, ok := err1.(ObjectBoostDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectBoostDeleteFailed: %T is not ObjectBoostDeleteFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectBoostDeleteFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 116 {
t.Errorf("Assertion failed on ObjectBoostDeleteFailed: %d != 116", err1.Code())
}
if err1.Description() != "The delete record operation for object boost failed." {
t.Errorf("Assertion failed on ObjectBoostDeleteFailed: %s != The delete record operation for object boost failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectBoostDeleteFailedError(errThingNotFound)
{
err2, ok := err2.(ObjectBoostDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on ObjectBoostDeleteFailed: %T is not ObjectBoostDeleteFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 116 {
t.Errorf("Assertion failed on ObjectBoostDeleteFailed: %d != 116", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectBoostDeleteFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectBoostDeleteFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectBoostDeleteFailedError{}) {
t.Errorf("Assertion failed on ObjectBoostDeleteFailed: ObjectBoostDeleteFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectBoostDeleteFailedError{}) {
t.Errorf("Assertion failed on ObjectBoostDeleteFailed: ObjectBoostDeleteFailedError{} not identified correctly")
}
if !errors.Is(err2, DeleteQueryFailedError{}) {
t.Errorf("Assertion failed on ObjectBoostDeleteFailed: DeleteQueryFailedError{} not identified correctly")
}
}
}
func TestInvalidObjectBoost (t *testing.T) {
err1 := NewInvalidObjectBoostError(nil)
{
err1, ok := err1.(InvalidObjectBoostError)
if !ok {
t.Errorf("Assertion failed on InvalidObjectBoost: %T is not InvalidObjectBoostError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on InvalidObjectBoost: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 117 {
t.Errorf("Assertion failed on InvalidObjectBoost: %d != 117", err1.Code())
}
if err1.Description() != "The object boost is invalid." {
t.Errorf("Assertion failed on InvalidObjectBoost: %s != The object boost is invalid.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewInvalidObjectBoostError(errThingNotFound)
{
err2, ok := err2.(InvalidObjectBoostError)
if !ok {
t.Errorf("Assertion failed on InvalidObjectBoost: %T is not InvalidObjectBoostError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 117 {
t.Errorf("Assertion failed on InvalidObjectBoost: %d != 117", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on InvalidObjectBoost: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on InvalidObjectBoost: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, InvalidObjectBoostError{}) {
t.Errorf("Assertion failed on InvalidObjectBoost: InvalidObjectBoostError{} not identified correctly")
}
if !errors.Is(errNestErr2, InvalidObjectBoostError{}) {
t.Errorf("Assertion failed on InvalidObjectBoost: InvalidObjectBoostError{} not identified correctly")
}
}
}
func TestObjectBoostNotFound (t *testing.T) {
err1 := NewObjectBoostNotFoundError(nil)
{
err1, ok := err1.(ObjectBoostNotFoundError)
if !ok {
t.Errorf("Assertion failed on ObjectBoostNotFound: %T is not ObjectBoostNotFoundError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ObjectBoostNotFound: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 118 {
t.Errorf("Assertion failed on ObjectBoostNotFound: %d != 118", err1.Code())
}
if err1.Description() != "The object boost was not found." {
t.Errorf("Assertion failed on ObjectBoostNotFound: %s != The object boost was not found.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewObjectBoostNotFoundError(errThingNotFound)
{
err2, ok := err2.(ObjectBoostNotFoundError)
if !ok {
t.Errorf("Assertion failed on ObjectBoostNotFound: %T is not ObjectBoostNotFoundError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 118 {
t.Errorf("Assertion failed on ObjectBoostNotFound: %d != 118", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ObjectBoostNotFound: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ObjectBoostNotFound: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ObjectBoostNotFoundError{}) {
t.Errorf("Assertion failed on ObjectBoostNotFound: ObjectBoostNotFoundError{} not identified correctly")
}
if !errors.Is(errNestErr2, ObjectBoostNotFoundError{}) {
t.Errorf("Assertion failed on ObjectBoostNotFound: ObjectBoostNotFoundError{} not identified correctly")
}
if !errors.Is(err2, NotFoundError{}) {
t.Errorf("Assertion failed on ObjectBoostNotFound: NotFoundError{} not identified correctly")
}
}
}
func TestImageQueryFailed (t *testing.T) {
err1 := NewImageQueryFailedError(nil)
{
err1, ok := err1.(ImageQueryFailedError)
if !ok {
t.Errorf("Assertion failed on ImageQueryFailed: %T is not ImageQueryFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ImageQueryFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 119 {
t.Errorf("Assertion failed on ImageQueryFailed: %d != 119", err1.Code())
}
if err1.Description() != "The image query failed." {
t.Errorf("Assertion failed on ImageQueryFailed: %s != The image query failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewImageQueryFailedError(errThingNotFound)
{
err2, ok := err2.(ImageQueryFailedError)
if !ok {
t.Errorf("Assertion failed on ImageQueryFailed: %T is not ImageQueryFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 119 {
t.Errorf("Assertion failed on ImageQueryFailed: %d != 119", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ImageQueryFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ImageQueryFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ImageQueryFailedError{}) {
t.Errorf("Assertion failed on ImageQueryFailed: ImageQueryFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ImageQueryFailedError{}) {
t.Errorf("Assertion failed on ImageQueryFailed: ImageQueryFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on ImageQueryFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestImageSelectFailed (t *testing.T) {
err1 := NewImageSelectFailedError(nil)
{
err1, ok := err1.(ImageSelectFailedError)
if !ok {
t.Errorf("Assertion failed on ImageSelectFailed: %T is not ImageSelectFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ImageSelectFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 120 {
t.Errorf("Assertion failed on ImageSelectFailed: %d != 120", err1.Code())
}
if err1.Description() != "The select record operation for image failed." {
t.Errorf("Assertion failed on ImageSelectFailed: %s != The select record operation for image failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewImageSelectFailedError(errThingNotFound)
{
err2, ok := err2.(ImageSelectFailedError)
if !ok {
t.Errorf("Assertion failed on ImageSelectFailed: %T is not ImageSelectFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 120 {
t.Errorf("Assertion failed on ImageSelectFailed: %d != 120", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ImageSelectFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ImageSelectFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ImageSelectFailedError{}) {
t.Errorf("Assertion failed on ImageSelectFailed: ImageSelectFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ImageSelectFailedError{}) {
t.Errorf("Assertion failed on ImageSelectFailed: ImageSelectFailedError{} not identified correctly")
}
if !errors.Is(err2, SelectQueryFailedError{}) {
t.Errorf("Assertion failed on ImageSelectFailed: SelectQueryFailedError{} not identified correctly")
}
}
}
func TestImageInsertFailed (t *testing.T) {
err1 := NewImageInsertFailedError(nil)
{
err1, ok := err1.(ImageInsertFailedError)
if !ok {
t.Errorf("Assertion failed on ImageInsertFailed: %T is not ImageInsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ImageInsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 121 {
t.Errorf("Assertion failed on ImageInsertFailed: %d != 121", err1.Code())
}
if err1.Description() != "The insert record operation for image failed." {
t.Errorf("Assertion failed on ImageInsertFailed: %s != The insert record operation for image failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewImageInsertFailedError(errThingNotFound)
{
err2, ok := err2.(ImageInsertFailedError)
if !ok {
t.Errorf("Assertion failed on ImageInsertFailed: %T is not ImageInsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 121 {
t.Errorf("Assertion failed on ImageInsertFailed: %d != 121", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ImageInsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ImageInsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ImageInsertFailedError{}) {
t.Errorf("Assertion failed on ImageInsertFailed: ImageInsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ImageInsertFailedError{}) {
t.Errorf("Assertion failed on ImageInsertFailed: ImageInsertFailedError{} not identified correctly")
}
if !errors.Is(err2, InsertQueryFailedError{}) {
t.Errorf("Assertion failed on ImageInsertFailed: InsertQueryFailedError{} not identified correctly")
}
}
}
func TestImageUpsertFailed (t *testing.T) {
err1 := NewImageUpsertFailedError(nil)
{
err1, ok := err1.(ImageUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on ImageUpsertFailed: %T is not ImageUpsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ImageUpsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 122 {
t.Errorf("Assertion failed on ImageUpsertFailed: %d != 122", err1.Code())
}
if err1.Description() != "The upsert record operation for image failed." {
t.Errorf("Assertion failed on ImageUpsertFailed: %s != The upsert record operation for image failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewImageUpsertFailedError(errThingNotFound)
{
err2, ok := err2.(ImageUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on ImageUpsertFailed: %T is not ImageUpsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 122 {
t.Errorf("Assertion failed on ImageUpsertFailed: %d != 122", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ImageUpsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ImageUpsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ImageUpsertFailedError{}) {
t.Errorf("Assertion failed on ImageUpsertFailed: ImageUpsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ImageUpsertFailedError{}) {
t.Errorf("Assertion failed on ImageUpsertFailed: ImageUpsertFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on ImageUpsertFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestImageUpdateFailed (t *testing.T) {
err1 := NewImageUpdateFailedError(nil)
{
err1, ok := err1.(ImageUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on ImageUpdateFailed: %T is not ImageUpdateFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ImageUpdateFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 123 {
t.Errorf("Assertion failed on ImageUpdateFailed: %d != 123", err1.Code())
}
if err1.Description() != "The update record operation for image failed." {
t.Errorf("Assertion failed on ImageUpdateFailed: %s != The update record operation for image failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewImageUpdateFailedError(errThingNotFound)
{
err2, ok := err2.(ImageUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on ImageUpdateFailed: %T is not ImageUpdateFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 123 {
t.Errorf("Assertion failed on ImageUpdateFailed: %d != 123", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ImageUpdateFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ImageUpdateFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ImageUpdateFailedError{}) {
t.Errorf("Assertion failed on ImageUpdateFailed: ImageUpdateFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ImageUpdateFailedError{}) {
t.Errorf("Assertion failed on ImageUpdateFailed: ImageUpdateFailedError{} not identified correctly")
}
if !errors.Is(err2, UpdateQueryFailedError{}) {
t.Errorf("Assertion failed on ImageUpdateFailed: UpdateQueryFailedError{} not identified correctly")
}
}
}
func TestImageDeleteFailed (t *testing.T) {
err1 := NewImageDeleteFailedError(nil)
{
err1, ok := err1.(ImageDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on ImageDeleteFailed: %T is not ImageDeleteFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ImageDeleteFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 124 {
t.Errorf("Assertion failed on ImageDeleteFailed: %d != 124", err1.Code())
}
if err1.Description() != "The delete record operation for image failed." {
t.Errorf("Assertion failed on ImageDeleteFailed: %s != The delete record operation for image failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewImageDeleteFailedError(errThingNotFound)
{
err2, ok := err2.(ImageDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on ImageDeleteFailed: %T is not ImageDeleteFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 124 {
t.Errorf("Assertion failed on ImageDeleteFailed: %d != 124", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ImageDeleteFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ImageDeleteFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ImageDeleteFailedError{}) {
t.Errorf("Assertion failed on ImageDeleteFailed: ImageDeleteFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ImageDeleteFailedError{}) {
t.Errorf("Assertion failed on ImageDeleteFailed: ImageDeleteFailedError{} not identified correctly")
}
if !errors.Is(err2, DeleteQueryFailedError{}) {
t.Errorf("Assertion failed on ImageDeleteFailed: DeleteQueryFailedError{} not identified correctly")
}
}
}
func TestInvalidImage (t *testing.T) {
err1 := NewInvalidImageError(nil)
{
err1, ok := err1.(InvalidImageError)
if !ok {
t.Errorf("Assertion failed on InvalidImage: %T is not InvalidImageError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on InvalidImage: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 125 {
t.Errorf("Assertion failed on InvalidImage: %d != 125", err1.Code())
}
if err1.Description() != "The image is invalid." {
t.Errorf("Assertion failed on InvalidImage: %s != The image is invalid.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewInvalidImageError(errThingNotFound)
{
err2, ok := err2.(InvalidImageError)
if !ok {
t.Errorf("Assertion failed on InvalidImage: %T is not InvalidImageError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 125 {
t.Errorf("Assertion failed on InvalidImage: %d != 125", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on InvalidImage: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on InvalidImage: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, InvalidImageError{}) {
t.Errorf("Assertion failed on InvalidImage: InvalidImageError{} not identified correctly")
}
if !errors.Is(errNestErr2, InvalidImageError{}) {
t.Errorf("Assertion failed on InvalidImage: InvalidImageError{} not identified correctly")
}
}
}
func TestImageNotFound (t *testing.T) {
err1 := NewImageNotFoundError(nil)
{
err1, ok := err1.(ImageNotFoundError)
if !ok {
t.Errorf("Assertion failed on ImageNotFound: %T is not ImageNotFoundError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ImageNotFound: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 126 {
t.Errorf("Assertion failed on ImageNotFound: %d != 126", err1.Code())
}
if err1.Description() != "The image was not found." {
t.Errorf("Assertion failed on ImageNotFound: %s != The image was not found.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewImageNotFoundError(errThingNotFound)
{
err2, ok := err2.(ImageNotFoundError)
if !ok {
t.Errorf("Assertion failed on ImageNotFound: %T is not ImageNotFoundError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 126 {
t.Errorf("Assertion failed on ImageNotFound: %d != 126", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ImageNotFound: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ImageNotFound: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ImageNotFoundError{}) {
t.Errorf("Assertion failed on ImageNotFound: ImageNotFoundError{} not identified correctly")
}
if !errors.Is(errNestErr2, ImageNotFoundError{}) {
t.Errorf("Assertion failed on ImageNotFound: ImageNotFoundError{} not identified correctly")
}
if !errors.Is(err2, NotFoundError{}) {
t.Errorf("Assertion failed on ImageNotFound: NotFoundError{} not identified correctly")
}
}
}
func TestImageAliasQueryFailed (t *testing.T) {
err1 := NewImageAliasQueryFailedError(nil)
{
err1, ok := err1.(ImageAliasQueryFailedError)
if !ok {
t.Errorf("Assertion failed on ImageAliasQueryFailed: %T is not ImageAliasQueryFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ImageAliasQueryFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 127 {
t.Errorf("Assertion failed on ImageAliasQueryFailed: %d != 127", err1.Code())
}
if err1.Description() != "The image alias query failed." {
t.Errorf("Assertion failed on ImageAliasQueryFailed: %s != The image alias query failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewImageAliasQueryFailedError(errThingNotFound)
{
err2, ok := err2.(ImageAliasQueryFailedError)
if !ok {
t.Errorf("Assertion failed on ImageAliasQueryFailed: %T is not ImageAliasQueryFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 127 {
t.Errorf("Assertion failed on ImageAliasQueryFailed: %d != 127", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ImageAliasQueryFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ImageAliasQueryFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ImageAliasQueryFailedError{}) {
t.Errorf("Assertion failed on ImageAliasQueryFailed: ImageAliasQueryFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ImageAliasQueryFailedError{}) {
t.Errorf("Assertion failed on ImageAliasQueryFailed: ImageAliasQueryFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on ImageAliasQueryFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestImageAliasSelectFailed (t *testing.T) {
err1 := NewImageAliasSelectFailedError(nil)
{
err1, ok := err1.(ImageAliasSelectFailedError)
if !ok {
t.Errorf("Assertion failed on ImageAliasSelectFailed: %T is not ImageAliasSelectFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ImageAliasSelectFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 128 {
t.Errorf("Assertion failed on ImageAliasSelectFailed: %d != 128", err1.Code())
}
if err1.Description() != "The select record operation for image alias failed." {
t.Errorf("Assertion failed on ImageAliasSelectFailed: %s != The select record operation for image alias failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewImageAliasSelectFailedError(errThingNotFound)
{
err2, ok := err2.(ImageAliasSelectFailedError)
if !ok {
t.Errorf("Assertion failed on ImageAliasSelectFailed: %T is not ImageAliasSelectFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 128 {
t.Errorf("Assertion failed on ImageAliasSelectFailed: %d != 128", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ImageAliasSelectFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ImageAliasSelectFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ImageAliasSelectFailedError{}) {
t.Errorf("Assertion failed on ImageAliasSelectFailed: ImageAliasSelectFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ImageAliasSelectFailedError{}) {
t.Errorf("Assertion failed on ImageAliasSelectFailed: ImageAliasSelectFailedError{} not identified correctly")
}
if !errors.Is(err2, SelectQueryFailedError{}) {
t.Errorf("Assertion failed on ImageAliasSelectFailed: SelectQueryFailedError{} not identified correctly")
}
}
}
func TestImageAliasInsertFailed (t *testing.T) {
err1 := NewImageAliasInsertFailedError(nil)
{
err1, ok := err1.(ImageAliasInsertFailedError)
if !ok {
t.Errorf("Assertion failed on ImageAliasInsertFailed: %T is not ImageAliasInsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ImageAliasInsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 129 {
t.Errorf("Assertion failed on ImageAliasInsertFailed: %d != 129", err1.Code())
}
if err1.Description() != "The insert record operation for image alias failed." {
t.Errorf("Assertion failed on ImageAliasInsertFailed: %s != The insert record operation for image alias failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewImageAliasInsertFailedError(errThingNotFound)
{
err2, ok := err2.(ImageAliasInsertFailedError)
if !ok {
t.Errorf("Assertion failed on ImageAliasInsertFailed: %T is not ImageAliasInsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 129 {
t.Errorf("Assertion failed on ImageAliasInsertFailed: %d != 129", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ImageAliasInsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ImageAliasInsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ImageAliasInsertFailedError{}) {
t.Errorf("Assertion failed on ImageAliasInsertFailed: ImageAliasInsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ImageAliasInsertFailedError{}) {
t.Errorf("Assertion failed on ImageAliasInsertFailed: ImageAliasInsertFailedError{} not identified correctly")
}
if !errors.Is(err2, InsertQueryFailedError{}) {
t.Errorf("Assertion failed on ImageAliasInsertFailed: InsertQueryFailedError{} not identified correctly")
}
}
}
func TestImageAliasUpsertFailed (t *testing.T) {
err1 := NewImageAliasUpsertFailedError(nil)
{
err1, ok := err1.(ImageAliasUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on ImageAliasUpsertFailed: %T is not ImageAliasUpsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ImageAliasUpsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 130 {
t.Errorf("Assertion failed on ImageAliasUpsertFailed: %d != 130", err1.Code())
}
if err1.Description() != "The upsert record operation for image alias failed." {
t.Errorf("Assertion failed on ImageAliasUpsertFailed: %s != The upsert record operation for image alias failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewImageAliasUpsertFailedError(errThingNotFound)
{
err2, ok := err2.(ImageAliasUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on ImageAliasUpsertFailed: %T is not ImageAliasUpsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 130 {
t.Errorf("Assertion failed on ImageAliasUpsertFailed: %d != 130", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ImageAliasUpsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ImageAliasUpsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ImageAliasUpsertFailedError{}) {
t.Errorf("Assertion failed on ImageAliasUpsertFailed: ImageAliasUpsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ImageAliasUpsertFailedError{}) {
t.Errorf("Assertion failed on ImageAliasUpsertFailed: ImageAliasUpsertFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on ImageAliasUpsertFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestImageAliasUpdateFailed (t *testing.T) {
err1 := NewImageAliasUpdateFailedError(nil)
{
err1, ok := err1.(ImageAliasUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on ImageAliasUpdateFailed: %T is not ImageAliasUpdateFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ImageAliasUpdateFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 131 {
t.Errorf("Assertion failed on ImageAliasUpdateFailed: %d != 131", err1.Code())
}
if err1.Description() != "The update record operation for image alias failed." {
t.Errorf("Assertion failed on ImageAliasUpdateFailed: %s != The update record operation for image alias failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewImageAliasUpdateFailedError(errThingNotFound)
{
err2, ok := err2.(ImageAliasUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on ImageAliasUpdateFailed: %T is not ImageAliasUpdateFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 131 {
t.Errorf("Assertion failed on ImageAliasUpdateFailed: %d != 131", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ImageAliasUpdateFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ImageAliasUpdateFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ImageAliasUpdateFailedError{}) {
t.Errorf("Assertion failed on ImageAliasUpdateFailed: ImageAliasUpdateFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ImageAliasUpdateFailedError{}) {
t.Errorf("Assertion failed on ImageAliasUpdateFailed: ImageAliasUpdateFailedError{} not identified correctly")
}
if !errors.Is(err2, UpdateQueryFailedError{}) {
t.Errorf("Assertion failed on ImageAliasUpdateFailed: UpdateQueryFailedError{} not identified correctly")
}
}
}
func TestImageAliasDeleteFailed (t *testing.T) {
err1 := NewImageAliasDeleteFailedError(nil)
{
err1, ok := err1.(ImageAliasDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on ImageAliasDeleteFailed: %T is not ImageAliasDeleteFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ImageAliasDeleteFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 132 {
t.Errorf("Assertion failed on ImageAliasDeleteFailed: %d != 132", err1.Code())
}
if err1.Description() != "The delete record operation for image alias failed." {
t.Errorf("Assertion failed on ImageAliasDeleteFailed: %s != The delete record operation for image alias failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewImageAliasDeleteFailedError(errThingNotFound)
{
err2, ok := err2.(ImageAliasDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on ImageAliasDeleteFailed: %T is not ImageAliasDeleteFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 132 {
t.Errorf("Assertion failed on ImageAliasDeleteFailed: %d != 132", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ImageAliasDeleteFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ImageAliasDeleteFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ImageAliasDeleteFailedError{}) {
t.Errorf("Assertion failed on ImageAliasDeleteFailed: ImageAliasDeleteFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, ImageAliasDeleteFailedError{}) {
t.Errorf("Assertion failed on ImageAliasDeleteFailed: ImageAliasDeleteFailedError{} not identified correctly")
}
if !errors.Is(err2, DeleteQueryFailedError{}) {
t.Errorf("Assertion failed on ImageAliasDeleteFailed: DeleteQueryFailedError{} not identified correctly")
}
}
}
func TestInvalidImageAlias (t *testing.T) {
err1 := NewInvalidImageAliasError(nil)
{
err1, ok := err1.(InvalidImageAliasError)
if !ok {
t.Errorf("Assertion failed on InvalidImageAlias: %T is not InvalidImageAliasError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on InvalidImageAlias: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 133 {
t.Errorf("Assertion failed on InvalidImageAlias: %d != 133", err1.Code())
}
if err1.Description() != "The image alias is invalid." {
t.Errorf("Assertion failed on InvalidImageAlias: %s != The image alias is invalid.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewInvalidImageAliasError(errThingNotFound)
{
err2, ok := err2.(InvalidImageAliasError)
if !ok {
t.Errorf("Assertion failed on InvalidImageAlias: %T is not InvalidImageAliasError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 133 {
t.Errorf("Assertion failed on InvalidImageAlias: %d != 133", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on InvalidImageAlias: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on InvalidImageAlias: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, InvalidImageAliasError{}) {
t.Errorf("Assertion failed on InvalidImageAlias: InvalidImageAliasError{} not identified correctly")
}
if !errors.Is(errNestErr2, InvalidImageAliasError{}) {
t.Errorf("Assertion failed on InvalidImageAlias: InvalidImageAliasError{} not identified correctly")
}
}
}
func TestImageAliasNotFound (t *testing.T) {
err1 := NewImageAliasNotFoundError(nil)
{
err1, ok := err1.(ImageAliasNotFoundError)
if !ok {
t.Errorf("Assertion failed on ImageAliasNotFound: %T is not ImageAliasNotFoundError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on ImageAliasNotFound: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 134 {
t.Errorf("Assertion failed on ImageAliasNotFound: %d != 134", err1.Code())
}
if err1.Description() != "The image alias was not found." {
t.Errorf("Assertion failed on ImageAliasNotFound: %s != The image alias was not found.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewImageAliasNotFoundError(errThingNotFound)
{
err2, ok := err2.(ImageAliasNotFoundError)
if !ok {
t.Errorf("Assertion failed on ImageAliasNotFound: %T is not ImageAliasNotFoundError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 134 {
t.Errorf("Assertion failed on ImageAliasNotFound: %d != 134", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on ImageAliasNotFound: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on ImageAliasNotFound: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, ImageAliasNotFoundError{}) {
t.Errorf("Assertion failed on ImageAliasNotFound: ImageAliasNotFoundError{} not identified correctly")
}
if !errors.Is(errNestErr2, ImageAliasNotFoundError{}) {
t.Errorf("Assertion failed on ImageAliasNotFound: ImageAliasNotFoundError{} not identified correctly")
}
if !errors.Is(err2, NotFoundError{}) {
t.Errorf("Assertion failed on ImageAliasNotFound: NotFoundError{} not identified correctly")
}
}
}
func TestGroupQueryFailed (t *testing.T) {
err1 := NewGroupQueryFailedError(nil)
{
err1, ok := err1.(GroupQueryFailedError)
if !ok {
t.Errorf("Assertion failed on GroupQueryFailed: %T is not GroupQueryFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on GroupQueryFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 135 {
t.Errorf("Assertion failed on GroupQueryFailed: %d != 135", err1.Code())
}
if err1.Description() != "The group query failed." {
t.Errorf("Assertion failed on GroupQueryFailed: %s != The group query failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewGroupQueryFailedError(errThingNotFound)
{
err2, ok := err2.(GroupQueryFailedError)
if !ok {
t.Errorf("Assertion failed on GroupQueryFailed: %T is not GroupQueryFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 135 {
t.Errorf("Assertion failed on GroupQueryFailed: %d != 135", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on GroupQueryFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on GroupQueryFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, GroupQueryFailedError{}) {
t.Errorf("Assertion failed on GroupQueryFailed: GroupQueryFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, GroupQueryFailedError{}) {
t.Errorf("Assertion failed on GroupQueryFailed: GroupQueryFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on GroupQueryFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestGroupSelectFailed (t *testing.T) {
err1 := NewGroupSelectFailedError(nil)
{
err1, ok := err1.(GroupSelectFailedError)
if !ok {
t.Errorf("Assertion failed on GroupSelectFailed: %T is not GroupSelectFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on GroupSelectFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 136 {
t.Errorf("Assertion failed on GroupSelectFailed: %d != 136", err1.Code())
}
if err1.Description() != "The select record operation for group failed." {
t.Errorf("Assertion failed on GroupSelectFailed: %s != The select record operation for group failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewGroupSelectFailedError(errThingNotFound)
{
err2, ok := err2.(GroupSelectFailedError)
if !ok {
t.Errorf("Assertion failed on GroupSelectFailed: %T is not GroupSelectFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 136 {
t.Errorf("Assertion failed on GroupSelectFailed: %d != 136", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on GroupSelectFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on GroupSelectFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, GroupSelectFailedError{}) {
t.Errorf("Assertion failed on GroupSelectFailed: GroupSelectFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, GroupSelectFailedError{}) {
t.Errorf("Assertion failed on GroupSelectFailed: GroupSelectFailedError{} not identified correctly")
}
if !errors.Is(err2, SelectQueryFailedError{}) {
t.Errorf("Assertion failed on GroupSelectFailed: SelectQueryFailedError{} not identified correctly")
}
}
}
func TestGroupInsertFailed (t *testing.T) {
err1 := NewGroupInsertFailedError(nil)
{
err1, ok := err1.(GroupInsertFailedError)
if !ok {
t.Errorf("Assertion failed on GroupInsertFailed: %T is not GroupInsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on GroupInsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 137 {
t.Errorf("Assertion failed on GroupInsertFailed: %d != 137", err1.Code())
}
if err1.Description() != "The insert record operation for group failed." {
t.Errorf("Assertion failed on GroupInsertFailed: %s != The insert record operation for group failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewGroupInsertFailedError(errThingNotFound)
{
err2, ok := err2.(GroupInsertFailedError)
if !ok {
t.Errorf("Assertion failed on GroupInsertFailed: %T is not GroupInsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 137 {
t.Errorf("Assertion failed on GroupInsertFailed: %d != 137", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on GroupInsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on GroupInsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, GroupInsertFailedError{}) {
t.Errorf("Assertion failed on GroupInsertFailed: GroupInsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, GroupInsertFailedError{}) {
t.Errorf("Assertion failed on GroupInsertFailed: GroupInsertFailedError{} not identified correctly")
}
if !errors.Is(err2, InsertQueryFailedError{}) {
t.Errorf("Assertion failed on GroupInsertFailed: InsertQueryFailedError{} not identified correctly")
}
}
}
func TestGroupUpsertFailed (t *testing.T) {
err1 := NewGroupUpsertFailedError(nil)
{
err1, ok := err1.(GroupUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on GroupUpsertFailed: %T is not GroupUpsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on GroupUpsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 138 {
t.Errorf("Assertion failed on GroupUpsertFailed: %d != 138", err1.Code())
}
if err1.Description() != "The upsert record operation for group failed." {
t.Errorf("Assertion failed on GroupUpsertFailed: %s != The upsert record operation for group failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewGroupUpsertFailedError(errThingNotFound)
{
err2, ok := err2.(GroupUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on GroupUpsertFailed: %T is not GroupUpsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 138 {
t.Errorf("Assertion failed on GroupUpsertFailed: %d != 138", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on GroupUpsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on GroupUpsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, GroupUpsertFailedError{}) {
t.Errorf("Assertion failed on GroupUpsertFailed: GroupUpsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, GroupUpsertFailedError{}) {
t.Errorf("Assertion failed on GroupUpsertFailed: GroupUpsertFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on GroupUpsertFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestGroupUpdateFailed (t *testing.T) {
err1 := NewGroupUpdateFailedError(nil)
{
err1, ok := err1.(GroupUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on GroupUpdateFailed: %T is not GroupUpdateFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on GroupUpdateFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 139 {
t.Errorf("Assertion failed on GroupUpdateFailed: %d != 139", err1.Code())
}
if err1.Description() != "The update record operation for group failed." {
t.Errorf("Assertion failed on GroupUpdateFailed: %s != The update record operation for group failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewGroupUpdateFailedError(errThingNotFound)
{
err2, ok := err2.(GroupUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on GroupUpdateFailed: %T is not GroupUpdateFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 139 {
t.Errorf("Assertion failed on GroupUpdateFailed: %d != 139", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on GroupUpdateFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on GroupUpdateFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, GroupUpdateFailedError{}) {
t.Errorf("Assertion failed on GroupUpdateFailed: GroupUpdateFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, GroupUpdateFailedError{}) {
t.Errorf("Assertion failed on GroupUpdateFailed: GroupUpdateFailedError{} not identified correctly")
}
if !errors.Is(err2, UpdateQueryFailedError{}) {
t.Errorf("Assertion failed on GroupUpdateFailed: UpdateQueryFailedError{} not identified correctly")
}
}
}
func TestGroupDeleteFailed (t *testing.T) {
err1 := NewGroupDeleteFailedError(nil)
{
err1, ok := err1.(GroupDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on GroupDeleteFailed: %T is not GroupDeleteFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on GroupDeleteFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 140 {
t.Errorf("Assertion failed on GroupDeleteFailed: %d != 140", err1.Code())
}
if err1.Description() != "The delete record operation for group failed." {
t.Errorf("Assertion failed on GroupDeleteFailed: %s != The delete record operation for group failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewGroupDeleteFailedError(errThingNotFound)
{
err2, ok := err2.(GroupDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on GroupDeleteFailed: %T is not GroupDeleteFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 140 {
t.Errorf("Assertion failed on GroupDeleteFailed: %d != 140", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on GroupDeleteFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on GroupDeleteFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, GroupDeleteFailedError{}) {
t.Errorf("Assertion failed on GroupDeleteFailed: GroupDeleteFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, GroupDeleteFailedError{}) {
t.Errorf("Assertion failed on GroupDeleteFailed: GroupDeleteFailedError{} not identified correctly")
}
if !errors.Is(err2, DeleteQueryFailedError{}) {
t.Errorf("Assertion failed on GroupDeleteFailed: DeleteQueryFailedError{} not identified correctly")
}
}
}
func TestInvalidGroup (t *testing.T) {
err1 := NewInvalidGroupError(nil)
{
err1, ok := err1.(InvalidGroupError)
if !ok {
t.Errorf("Assertion failed on InvalidGroup: %T is not InvalidGroupError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on InvalidGroup: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 141 {
t.Errorf("Assertion failed on InvalidGroup: %d != 141", err1.Code())
}
if err1.Description() != "The group is invalid." {
t.Errorf("Assertion failed on InvalidGroup: %s != The group is invalid.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewInvalidGroupError(errThingNotFound)
{
err2, ok := err2.(InvalidGroupError)
if !ok {
t.Errorf("Assertion failed on InvalidGroup: %T is not InvalidGroupError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 141 {
t.Errorf("Assertion failed on InvalidGroup: %d != 141", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on InvalidGroup: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on InvalidGroup: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, InvalidGroupError{}) {
t.Errorf("Assertion failed on InvalidGroup: InvalidGroupError{} not identified correctly")
}
if !errors.Is(errNestErr2, InvalidGroupError{}) {
t.Errorf("Assertion failed on InvalidGroup: InvalidGroupError{} not identified correctly")
}
}
}
func TestGroupNotFound (t *testing.T) {
err1 := NewGroupNotFoundError(nil)
{
err1, ok := err1.(GroupNotFoundError)
if !ok {
t.Errorf("Assertion failed on GroupNotFound: %T is not GroupNotFoundError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on GroupNotFound: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 142 {
t.Errorf("Assertion failed on GroupNotFound: %d != 142", err1.Code())
}
if err1.Description() != "The group was not found." {
t.Errorf("Assertion failed on GroupNotFound: %s != The group was not found.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewGroupNotFoundError(errThingNotFound)
{
err2, ok := err2.(GroupNotFoundError)
if !ok {
t.Errorf("Assertion failed on GroupNotFound: %T is not GroupNotFoundError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 142 {
t.Errorf("Assertion failed on GroupNotFound: %d != 142", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on GroupNotFound: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on GroupNotFound: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, GroupNotFoundError{}) {
t.Errorf("Assertion failed on GroupNotFound: GroupNotFoundError{} not identified correctly")
}
if !errors.Is(errNestErr2, GroupNotFoundError{}) {
t.Errorf("Assertion failed on GroupNotFound: GroupNotFoundError{} not identified correctly")
}
if !errors.Is(err2, NotFoundError{}) {
t.Errorf("Assertion failed on GroupNotFound: NotFoundError{} not identified correctly")
}
}
}
func TestGroupMemberQueryFailed (t *testing.T) {
err1 := NewGroupMemberQueryFailedError(nil)
{
err1, ok := err1.(GroupMemberQueryFailedError)
if !ok {
t.Errorf("Assertion failed on GroupMemberQueryFailed: %T is not GroupMemberQueryFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on GroupMemberQueryFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 143 {
t.Errorf("Assertion failed on GroupMemberQueryFailed: %d != 143", err1.Code())
}
if err1.Description() != "The group member query failed." {
t.Errorf("Assertion failed on GroupMemberQueryFailed: %s != The group member query failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewGroupMemberQueryFailedError(errThingNotFound)
{
err2, ok := err2.(GroupMemberQueryFailedError)
if !ok {
t.Errorf("Assertion failed on GroupMemberQueryFailed: %T is not GroupMemberQueryFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 143 {
t.Errorf("Assertion failed on GroupMemberQueryFailed: %d != 143", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on GroupMemberQueryFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on GroupMemberQueryFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, GroupMemberQueryFailedError{}) {
t.Errorf("Assertion failed on GroupMemberQueryFailed: GroupMemberQueryFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, GroupMemberQueryFailedError{}) {
t.Errorf("Assertion failed on GroupMemberQueryFailed: GroupMemberQueryFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on GroupMemberQueryFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestGroupMemberSelectFailed (t *testing.T) {
err1 := NewGroupMemberSelectFailedError(nil)
{
err1, ok := err1.(GroupMemberSelectFailedError)
if !ok {
t.Errorf("Assertion failed on GroupMemberSelectFailed: %T is not GroupMemberSelectFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on GroupMemberSelectFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 144 {
t.Errorf("Assertion failed on GroupMemberSelectFailed: %d != 144", err1.Code())
}
if err1.Description() != "The select record operation for group member failed." {
t.Errorf("Assertion failed on GroupMemberSelectFailed: %s != The select record operation for group member failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewGroupMemberSelectFailedError(errThingNotFound)
{
err2, ok := err2.(GroupMemberSelectFailedError)
if !ok {
t.Errorf("Assertion failed on GroupMemberSelectFailed: %T is not GroupMemberSelectFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 144 {
t.Errorf("Assertion failed on GroupMemberSelectFailed: %d != 144", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on GroupMemberSelectFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on GroupMemberSelectFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, GroupMemberSelectFailedError{}) {
t.Errorf("Assertion failed on GroupMemberSelectFailed: GroupMemberSelectFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, GroupMemberSelectFailedError{}) {
t.Errorf("Assertion failed on GroupMemberSelectFailed: GroupMemberSelectFailedError{} not identified correctly")
}
if !errors.Is(err2, SelectQueryFailedError{}) {
t.Errorf("Assertion failed on GroupMemberSelectFailed: SelectQueryFailedError{} not identified correctly")
}
}
}
func TestGroupMemberInsertFailed (t *testing.T) {
err1 := NewGroupMemberInsertFailedError(nil)
{
err1, ok := err1.(GroupMemberInsertFailedError)
if !ok {
t.Errorf("Assertion failed on GroupMemberInsertFailed: %T is not GroupMemberInsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on GroupMemberInsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 145 {
t.Errorf("Assertion failed on GroupMemberInsertFailed: %d != 145", err1.Code())
}
if err1.Description() != "The insert record operation for group member failed." {
t.Errorf("Assertion failed on GroupMemberInsertFailed: %s != The insert record operation for group member failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewGroupMemberInsertFailedError(errThingNotFound)
{
err2, ok := err2.(GroupMemberInsertFailedError)
if !ok {
t.Errorf("Assertion failed on GroupMemberInsertFailed: %T is not GroupMemberInsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 145 {
t.Errorf("Assertion failed on GroupMemberInsertFailed: %d != 145", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on GroupMemberInsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on GroupMemberInsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, GroupMemberInsertFailedError{}) {
t.Errorf("Assertion failed on GroupMemberInsertFailed: GroupMemberInsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, GroupMemberInsertFailedError{}) {
t.Errorf("Assertion failed on GroupMemberInsertFailed: GroupMemberInsertFailedError{} not identified correctly")
}
if !errors.Is(err2, InsertQueryFailedError{}) {
t.Errorf("Assertion failed on GroupMemberInsertFailed: InsertQueryFailedError{} not identified correctly")
}
}
}
func TestGroupMemberUpsertFailed (t *testing.T) {
err1 := NewGroupMemberUpsertFailedError(nil)
{
err1, ok := err1.(GroupMemberUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on GroupMemberUpsertFailed: %T is not GroupMemberUpsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on GroupMemberUpsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 146 {
t.Errorf("Assertion failed on GroupMemberUpsertFailed: %d != 146", err1.Code())
}
if err1.Description() != "The upsert record operation for group member failed." {
t.Errorf("Assertion failed on GroupMemberUpsertFailed: %s != The upsert record operation for group member failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewGroupMemberUpsertFailedError(errThingNotFound)
{
err2, ok := err2.(GroupMemberUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on GroupMemberUpsertFailed: %T is not GroupMemberUpsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 146 {
t.Errorf("Assertion failed on GroupMemberUpsertFailed: %d != 146", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on GroupMemberUpsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on GroupMemberUpsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, GroupMemberUpsertFailedError{}) {
t.Errorf("Assertion failed on GroupMemberUpsertFailed: GroupMemberUpsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, GroupMemberUpsertFailedError{}) {
t.Errorf("Assertion failed on GroupMemberUpsertFailed: GroupMemberUpsertFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on GroupMemberUpsertFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestGroupMemberUpdateFailed (t *testing.T) {
err1 := NewGroupMemberUpdateFailedError(nil)
{
err1, ok := err1.(GroupMemberUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on GroupMemberUpdateFailed: %T is not GroupMemberUpdateFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on GroupMemberUpdateFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 147 {
t.Errorf("Assertion failed on GroupMemberUpdateFailed: %d != 147", err1.Code())
}
if err1.Description() != "The update record operation for group member failed." {
t.Errorf("Assertion failed on GroupMemberUpdateFailed: %s != The update record operation for group member failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewGroupMemberUpdateFailedError(errThingNotFound)
{
err2, ok := err2.(GroupMemberUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on GroupMemberUpdateFailed: %T is not GroupMemberUpdateFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 147 {
t.Errorf("Assertion failed on GroupMemberUpdateFailed: %d != 147", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on GroupMemberUpdateFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on GroupMemberUpdateFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, GroupMemberUpdateFailedError{}) {
t.Errorf("Assertion failed on GroupMemberUpdateFailed: GroupMemberUpdateFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, GroupMemberUpdateFailedError{}) {
t.Errorf("Assertion failed on GroupMemberUpdateFailed: GroupMemberUpdateFailedError{} not identified correctly")
}
if !errors.Is(err2, UpdateQueryFailedError{}) {
t.Errorf("Assertion failed on GroupMemberUpdateFailed: UpdateQueryFailedError{} not identified correctly")
}
}
}
func TestGroupMemberDeleteFailed (t *testing.T) {
err1 := NewGroupMemberDeleteFailedError(nil)
{
err1, ok := err1.(GroupMemberDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on GroupMemberDeleteFailed: %T is not GroupMemberDeleteFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on GroupMemberDeleteFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 148 {
t.Errorf("Assertion failed on GroupMemberDeleteFailed: %d != 148", err1.Code())
}
if err1.Description() != "The delete record operation for group member failed." {
t.Errorf("Assertion failed on GroupMemberDeleteFailed: %s != The delete record operation for group member failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewGroupMemberDeleteFailedError(errThingNotFound)
{
err2, ok := err2.(GroupMemberDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on GroupMemberDeleteFailed: %T is not GroupMemberDeleteFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 148 {
t.Errorf("Assertion failed on GroupMemberDeleteFailed: %d != 148", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on GroupMemberDeleteFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on GroupMemberDeleteFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, GroupMemberDeleteFailedError{}) {
t.Errorf("Assertion failed on GroupMemberDeleteFailed: GroupMemberDeleteFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, GroupMemberDeleteFailedError{}) {
t.Errorf("Assertion failed on GroupMemberDeleteFailed: GroupMemberDeleteFailedError{} not identified correctly")
}
if !errors.Is(err2, DeleteQueryFailedError{}) {
t.Errorf("Assertion failed on GroupMemberDeleteFailed: DeleteQueryFailedError{} not identified correctly")
}
}
}
func TestInvalidGroupMember (t *testing.T) {
err1 := NewInvalidGroupMemberError(nil)
{
err1, ok := err1.(InvalidGroupMemberError)
if !ok {
t.Errorf("Assertion failed on InvalidGroupMember: %T is not InvalidGroupMemberError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on InvalidGroupMember: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 149 {
t.Errorf("Assertion failed on InvalidGroupMember: %d != 149", err1.Code())
}
if err1.Description() != "The group member is invalid." {
t.Errorf("Assertion failed on InvalidGroupMember: %s != The group member is invalid.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewInvalidGroupMemberError(errThingNotFound)
{
err2, ok := err2.(InvalidGroupMemberError)
if !ok {
t.Errorf("Assertion failed on InvalidGroupMember: %T is not InvalidGroupMemberError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 149 {
t.Errorf("Assertion failed on InvalidGroupMember: %d != 149", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on InvalidGroupMember: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on InvalidGroupMember: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, InvalidGroupMemberError{}) {
t.Errorf("Assertion failed on InvalidGroupMember: InvalidGroupMemberError{} not identified correctly")
}
if !errors.Is(errNestErr2, InvalidGroupMemberError{}) {
t.Errorf("Assertion failed on InvalidGroupMember: InvalidGroupMemberError{} not identified correctly")
}
}
}
func TestGroupMemberNotFound (t *testing.T) {
err1 := NewGroupMemberNotFoundError(nil)
{
err1, ok := err1.(GroupMemberNotFoundError)
if !ok {
t.Errorf("Assertion failed on GroupMemberNotFound: %T is not GroupMemberNotFoundError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on GroupMemberNotFound: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 150 {
t.Errorf("Assertion failed on GroupMemberNotFound: %d != 150", err1.Code())
}
if err1.Description() != "The group member was not found." {
t.Errorf("Assertion failed on GroupMemberNotFound: %s != The group member was not found.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewGroupMemberNotFoundError(errThingNotFound)
{
err2, ok := err2.(GroupMemberNotFoundError)
if !ok {
t.Errorf("Assertion failed on GroupMemberNotFound: %T is not GroupMemberNotFoundError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 150 {
t.Errorf("Assertion failed on GroupMemberNotFound: %d != 150", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on GroupMemberNotFound: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on GroupMemberNotFound: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, GroupMemberNotFoundError{}) {
t.Errorf("Assertion failed on GroupMemberNotFound: GroupMemberNotFoundError{} not identified correctly")
}
if !errors.Is(errNestErr2, GroupMemberNotFoundError{}) {
t.Errorf("Assertion failed on GroupMemberNotFound: GroupMemberNotFoundError{} not identified correctly")
}
if !errors.Is(err2, NotFoundError{}) {
t.Errorf("Assertion failed on GroupMemberNotFound: NotFoundError{} not identified correctly")
}
}
}
func TestGroupInvitationQueryFailed (t *testing.T) {
err1 := NewGroupInvitationQueryFailedError(nil)
{
err1, ok := err1.(GroupInvitationQueryFailedError)
if !ok {
t.Errorf("Assertion failed on GroupInvitationQueryFailed: %T is not GroupInvitationQueryFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on GroupInvitationQueryFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 151 {
t.Errorf("Assertion failed on GroupInvitationQueryFailed: %d != 151", err1.Code())
}
if err1.Description() != "The group invitation query failed." {
t.Errorf("Assertion failed on GroupInvitationQueryFailed: %s != The group invitation query failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewGroupInvitationQueryFailedError(errThingNotFound)
{
err2, ok := err2.(GroupInvitationQueryFailedError)
if !ok {
t.Errorf("Assertion failed on GroupInvitationQueryFailed: %T is not GroupInvitationQueryFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 151 {
t.Errorf("Assertion failed on GroupInvitationQueryFailed: %d != 151", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on GroupInvitationQueryFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on GroupInvitationQueryFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, GroupInvitationQueryFailedError{}) {
t.Errorf("Assertion failed on GroupInvitationQueryFailed: GroupInvitationQueryFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, GroupInvitationQueryFailedError{}) {
t.Errorf("Assertion failed on GroupInvitationQueryFailed: GroupInvitationQueryFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on GroupInvitationQueryFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestGroupInvitationSelectFailed (t *testing.T) {
err1 := NewGroupInvitationSelectFailedError(nil)
{
err1, ok := err1.(GroupInvitationSelectFailedError)
if !ok {
t.Errorf("Assertion failed on GroupInvitationSelectFailed: %T is not GroupInvitationSelectFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on GroupInvitationSelectFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 152 {
t.Errorf("Assertion failed on GroupInvitationSelectFailed: %d != 152", err1.Code())
}
if err1.Description() != "The select record operation for group invitation failed." {
t.Errorf("Assertion failed on GroupInvitationSelectFailed: %s != The select record operation for group invitation failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewGroupInvitationSelectFailedError(errThingNotFound)
{
err2, ok := err2.(GroupInvitationSelectFailedError)
if !ok {
t.Errorf("Assertion failed on GroupInvitationSelectFailed: %T is not GroupInvitationSelectFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 152 {
t.Errorf("Assertion failed on GroupInvitationSelectFailed: %d != 152", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on GroupInvitationSelectFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on GroupInvitationSelectFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, GroupInvitationSelectFailedError{}) {
t.Errorf("Assertion failed on GroupInvitationSelectFailed: GroupInvitationSelectFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, GroupInvitationSelectFailedError{}) {
t.Errorf("Assertion failed on GroupInvitationSelectFailed: GroupInvitationSelectFailedError{} not identified correctly")
}
if !errors.Is(err2, SelectQueryFailedError{}) {
t.Errorf("Assertion failed on GroupInvitationSelectFailed: SelectQueryFailedError{} not identified correctly")
}
}
}
func TestGroupInvitationInsertFailed (t *testing.T) {
err1 := NewGroupInvitationInsertFailedError(nil)
{
err1, ok := err1.(GroupInvitationInsertFailedError)
if !ok {
t.Errorf("Assertion failed on GroupInvitationInsertFailed: %T is not GroupInvitationInsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on GroupInvitationInsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 153 {
t.Errorf("Assertion failed on GroupInvitationInsertFailed: %d != 153", err1.Code())
}
if err1.Description() != "The insert record operation for group invitation failed." {
t.Errorf("Assertion failed on GroupInvitationInsertFailed: %s != The insert record operation for group invitation failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewGroupInvitationInsertFailedError(errThingNotFound)
{
err2, ok := err2.(GroupInvitationInsertFailedError)
if !ok {
t.Errorf("Assertion failed on GroupInvitationInsertFailed: %T is not GroupInvitationInsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 153 {
t.Errorf("Assertion failed on GroupInvitationInsertFailed: %d != 153", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on GroupInvitationInsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on GroupInvitationInsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, GroupInvitationInsertFailedError{}) {
t.Errorf("Assertion failed on GroupInvitationInsertFailed: GroupInvitationInsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, GroupInvitationInsertFailedError{}) {
t.Errorf("Assertion failed on GroupInvitationInsertFailed: GroupInvitationInsertFailedError{} not identified correctly")
}
if !errors.Is(err2, InsertQueryFailedError{}) {
t.Errorf("Assertion failed on GroupInvitationInsertFailed: InsertQueryFailedError{} not identified correctly")
}
}
}
func TestGroupInvitationUpsertFailed (t *testing.T) {
err1 := NewGroupInvitationUpsertFailedError(nil)
{
err1, ok := err1.(GroupInvitationUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on GroupInvitationUpsertFailed: %T is not GroupInvitationUpsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on GroupInvitationUpsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 154 {
t.Errorf("Assertion failed on GroupInvitationUpsertFailed: %d != 154", err1.Code())
}
if err1.Description() != "The upsert record operation for group invitation failed." {
t.Errorf("Assertion failed on GroupInvitationUpsertFailed: %s != The upsert record operation for group invitation failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewGroupInvitationUpsertFailedError(errThingNotFound)
{
err2, ok := err2.(GroupInvitationUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on GroupInvitationUpsertFailed: %T is not GroupInvitationUpsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 154 {
t.Errorf("Assertion failed on GroupInvitationUpsertFailed: %d != 154", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on GroupInvitationUpsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on GroupInvitationUpsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, GroupInvitationUpsertFailedError{}) {
t.Errorf("Assertion failed on GroupInvitationUpsertFailed: GroupInvitationUpsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, GroupInvitationUpsertFailedError{}) {
t.Errorf("Assertion failed on GroupInvitationUpsertFailed: GroupInvitationUpsertFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on GroupInvitationUpsertFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestGroupInvitationUpdateFailed (t *testing.T) {
err1 := NewGroupInvitationUpdateFailedError(nil)
{
err1, ok := err1.(GroupInvitationUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on GroupInvitationUpdateFailed: %T is not GroupInvitationUpdateFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on GroupInvitationUpdateFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 155 {
t.Errorf("Assertion failed on GroupInvitationUpdateFailed: %d != 155", err1.Code())
}
if err1.Description() != "The update record operation for group invitation failed." {
t.Errorf("Assertion failed on GroupInvitationUpdateFailed: %s != The update record operation for group invitation failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewGroupInvitationUpdateFailedError(errThingNotFound)
{
err2, ok := err2.(GroupInvitationUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on GroupInvitationUpdateFailed: %T is not GroupInvitationUpdateFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 155 {
t.Errorf("Assertion failed on GroupInvitationUpdateFailed: %d != 155", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on GroupInvitationUpdateFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on GroupInvitationUpdateFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, GroupInvitationUpdateFailedError{}) {
t.Errorf("Assertion failed on GroupInvitationUpdateFailed: GroupInvitationUpdateFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, GroupInvitationUpdateFailedError{}) {
t.Errorf("Assertion failed on GroupInvitationUpdateFailed: GroupInvitationUpdateFailedError{} not identified correctly")
}
if !errors.Is(err2, UpdateQueryFailedError{}) {
t.Errorf("Assertion failed on GroupInvitationUpdateFailed: UpdateQueryFailedError{} not identified correctly")
}
}
}
func TestGroupInvitationDeleteFailed (t *testing.T) {
err1 := NewGroupInvitationDeleteFailedError(nil)
{
err1, ok := err1.(GroupInvitationDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on GroupInvitationDeleteFailed: %T is not GroupInvitationDeleteFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on GroupInvitationDeleteFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 156 {
t.Errorf("Assertion failed on GroupInvitationDeleteFailed: %d != 156", err1.Code())
}
if err1.Description() != "The delete record operation for group invitation failed." {
t.Errorf("Assertion failed on GroupInvitationDeleteFailed: %s != The delete record operation for group invitation failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewGroupInvitationDeleteFailedError(errThingNotFound)
{
err2, ok := err2.(GroupInvitationDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on GroupInvitationDeleteFailed: %T is not GroupInvitationDeleteFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 156 {
t.Errorf("Assertion failed on GroupInvitationDeleteFailed: %d != 156", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on GroupInvitationDeleteFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on GroupInvitationDeleteFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, GroupInvitationDeleteFailedError{}) {
t.Errorf("Assertion failed on GroupInvitationDeleteFailed: GroupInvitationDeleteFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, GroupInvitationDeleteFailedError{}) {
t.Errorf("Assertion failed on GroupInvitationDeleteFailed: GroupInvitationDeleteFailedError{} not identified correctly")
}
if !errors.Is(err2, DeleteQueryFailedError{}) {
t.Errorf("Assertion failed on GroupInvitationDeleteFailed: DeleteQueryFailedError{} not identified correctly")
}
}
}
func TestInvalidGroupInvitation (t *testing.T) {
err1 := NewInvalidGroupInvitationError(nil)
{
err1, ok := err1.(InvalidGroupInvitationError)
if !ok {
t.Errorf("Assertion failed on InvalidGroupInvitation: %T is not InvalidGroupInvitationError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on InvalidGroupInvitation: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 157 {
t.Errorf("Assertion failed on InvalidGroupInvitation: %d != 157", err1.Code())
}
if err1.Description() != "The group invitation is invalid." {
t.Errorf("Assertion failed on InvalidGroupInvitation: %s != The group invitation is invalid.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewInvalidGroupInvitationError(errThingNotFound)
{
err2, ok := err2.(InvalidGroupInvitationError)
if !ok {
t.Errorf("Assertion failed on InvalidGroupInvitation: %T is not InvalidGroupInvitationError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 157 {
t.Errorf("Assertion failed on InvalidGroupInvitation: %d != 157", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on InvalidGroupInvitation: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on InvalidGroupInvitation: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, InvalidGroupInvitationError{}) {
t.Errorf("Assertion failed on InvalidGroupInvitation: InvalidGroupInvitationError{} not identified correctly")
}
if !errors.Is(errNestErr2, InvalidGroupInvitationError{}) {
t.Errorf("Assertion failed on InvalidGroupInvitation: InvalidGroupInvitationError{} not identified correctly")
}
}
}
func TestGroupInvitationNotFound (t *testing.T) {
err1 := NewGroupInvitationNotFoundError(nil)
{
err1, ok := err1.(GroupInvitationNotFoundError)
if !ok {
t.Errorf("Assertion failed on GroupInvitationNotFound: %T is not GroupInvitationNotFoundError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on GroupInvitationNotFound: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 158 {
t.Errorf("Assertion failed on GroupInvitationNotFound: %d != 158", err1.Code())
}
if err1.Description() != "The group invitation was not found." {
t.Errorf("Assertion failed on GroupInvitationNotFound: %s != The group invitation was not found.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewGroupInvitationNotFoundError(errThingNotFound)
{
err2, ok := err2.(GroupInvitationNotFoundError)
if !ok {
t.Errorf("Assertion failed on GroupInvitationNotFound: %T is not GroupInvitationNotFoundError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 158 {
t.Errorf("Assertion failed on GroupInvitationNotFound: %d != 158", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on GroupInvitationNotFound: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on GroupInvitationNotFound: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, GroupInvitationNotFoundError{}) {
t.Errorf("Assertion failed on GroupInvitationNotFound: GroupInvitationNotFoundError{} not identified correctly")
}
if !errors.Is(errNestErr2, GroupInvitationNotFoundError{}) {
t.Errorf("Assertion failed on GroupInvitationNotFound: GroupInvitationNotFoundError{} not identified correctly")
}
if !errors.Is(err2, NotFoundError{}) {
t.Errorf("Assertion failed on GroupInvitationNotFound: NotFoundError{} not identified correctly")
}
}
}
func TestGroupBoostQueryFailed (t *testing.T) {
err1 := NewGroupBoostQueryFailedError(nil)
{
err1, ok := err1.(GroupBoostQueryFailedError)
if !ok {
t.Errorf("Assertion failed on GroupBoostQueryFailed: %T is not GroupBoostQueryFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on GroupBoostQueryFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 159 {
t.Errorf("Assertion failed on GroupBoostQueryFailed: %d != 159", err1.Code())
}
if err1.Description() != "The group boost query failed." {
t.Errorf("Assertion failed on GroupBoostQueryFailed: %s != The group boost query failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewGroupBoostQueryFailedError(errThingNotFound)
{
err2, ok := err2.(GroupBoostQueryFailedError)
if !ok {
t.Errorf("Assertion failed on GroupBoostQueryFailed: %T is not GroupBoostQueryFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 159 {
t.Errorf("Assertion failed on GroupBoostQueryFailed: %d != 159", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on GroupBoostQueryFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on GroupBoostQueryFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, GroupBoostQueryFailedError{}) {
t.Errorf("Assertion failed on GroupBoostQueryFailed: GroupBoostQueryFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, GroupBoostQueryFailedError{}) {
t.Errorf("Assertion failed on GroupBoostQueryFailed: GroupBoostQueryFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on GroupBoostQueryFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestGroupBoostSelectFailed (t *testing.T) {
err1 := NewGroupBoostSelectFailedError(nil)
{
err1, ok := err1.(GroupBoostSelectFailedError)
if !ok {
t.Errorf("Assertion failed on GroupBoostSelectFailed: %T is not GroupBoostSelectFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on GroupBoostSelectFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 160 {
t.Errorf("Assertion failed on GroupBoostSelectFailed: %d != 160", err1.Code())
}
if err1.Description() != "The select record operation for group boost failed." {
t.Errorf("Assertion failed on GroupBoostSelectFailed: %s != The select record operation for group boost failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewGroupBoostSelectFailedError(errThingNotFound)
{
err2, ok := err2.(GroupBoostSelectFailedError)
if !ok {
t.Errorf("Assertion failed on GroupBoostSelectFailed: %T is not GroupBoostSelectFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 160 {
t.Errorf("Assertion failed on GroupBoostSelectFailed: %d != 160", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on GroupBoostSelectFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on GroupBoostSelectFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, GroupBoostSelectFailedError{}) {
t.Errorf("Assertion failed on GroupBoostSelectFailed: GroupBoostSelectFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, GroupBoostSelectFailedError{}) {
t.Errorf("Assertion failed on GroupBoostSelectFailed: GroupBoostSelectFailedError{} not identified correctly")
}
if !errors.Is(err2, SelectQueryFailedError{}) {
t.Errorf("Assertion failed on GroupBoostSelectFailed: SelectQueryFailedError{} not identified correctly")
}
}
}
func TestGroupBoostInsertFailed (t *testing.T) {
err1 := NewGroupBoostInsertFailedError(nil)
{
err1, ok := err1.(GroupBoostInsertFailedError)
if !ok {
t.Errorf("Assertion failed on GroupBoostInsertFailed: %T is not GroupBoostInsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on GroupBoostInsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 161 {
t.Errorf("Assertion failed on GroupBoostInsertFailed: %d != 161", err1.Code())
}
if err1.Description() != "The insert record operation for group boost failed." {
t.Errorf("Assertion failed on GroupBoostInsertFailed: %s != The insert record operation for group boost failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewGroupBoostInsertFailedError(errThingNotFound)
{
err2, ok := err2.(GroupBoostInsertFailedError)
if !ok {
t.Errorf("Assertion failed on GroupBoostInsertFailed: %T is not GroupBoostInsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 161 {
t.Errorf("Assertion failed on GroupBoostInsertFailed: %d != 161", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on GroupBoostInsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on GroupBoostInsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, GroupBoostInsertFailedError{}) {
t.Errorf("Assertion failed on GroupBoostInsertFailed: GroupBoostInsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, GroupBoostInsertFailedError{}) {
t.Errorf("Assertion failed on GroupBoostInsertFailed: GroupBoostInsertFailedError{} not identified correctly")
}
if !errors.Is(err2, InsertQueryFailedError{}) {
t.Errorf("Assertion failed on GroupBoostInsertFailed: InsertQueryFailedError{} not identified correctly")
}
}
}
func TestGroupBoostUpsertFailed (t *testing.T) {
err1 := NewGroupBoostUpsertFailedError(nil)
{
err1, ok := err1.(GroupBoostUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on GroupBoostUpsertFailed: %T is not GroupBoostUpsertFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on GroupBoostUpsertFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 162 {
t.Errorf("Assertion failed on GroupBoostUpsertFailed: %d != 162", err1.Code())
}
if err1.Description() != "The upsert record operation for group boost failed." {
t.Errorf("Assertion failed on GroupBoostUpsertFailed: %s != The upsert record operation for group boost failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewGroupBoostUpsertFailedError(errThingNotFound)
{
err2, ok := err2.(GroupBoostUpsertFailedError)
if !ok {
t.Errorf("Assertion failed on GroupBoostUpsertFailed: %T is not GroupBoostUpsertFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 162 {
t.Errorf("Assertion failed on GroupBoostUpsertFailed: %d != 162", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on GroupBoostUpsertFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on GroupBoostUpsertFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, GroupBoostUpsertFailedError{}) {
t.Errorf("Assertion failed on GroupBoostUpsertFailed: GroupBoostUpsertFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, GroupBoostUpsertFailedError{}) {
t.Errorf("Assertion failed on GroupBoostUpsertFailed: GroupBoostUpsertFailedError{} not identified correctly")
}
if !errors.Is(err2, QueryFailedError{}) {
t.Errorf("Assertion failed on GroupBoostUpsertFailed: QueryFailedError{} not identified correctly")
}
}
}
func TestGroupBoostUpdateFailed (t *testing.T) {
err1 := NewGroupBoostUpdateFailedError(nil)
{
err1, ok := err1.(GroupBoostUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on GroupBoostUpdateFailed: %T is not GroupBoostUpdateFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on GroupBoostUpdateFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 163 {
t.Errorf("Assertion failed on GroupBoostUpdateFailed: %d != 163", err1.Code())
}
if err1.Description() != "The update record operation for group boost failed." {
t.Errorf("Assertion failed on GroupBoostUpdateFailed: %s != The update record operation for group boost failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewGroupBoostUpdateFailedError(errThingNotFound)
{
err2, ok := err2.(GroupBoostUpdateFailedError)
if !ok {
t.Errorf("Assertion failed on GroupBoostUpdateFailed: %T is not GroupBoostUpdateFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 163 {
t.Errorf("Assertion failed on GroupBoostUpdateFailed: %d != 163", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on GroupBoostUpdateFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on GroupBoostUpdateFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, GroupBoostUpdateFailedError{}) {
t.Errorf("Assertion failed on GroupBoostUpdateFailed: GroupBoostUpdateFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, GroupBoostUpdateFailedError{}) {
t.Errorf("Assertion failed on GroupBoostUpdateFailed: GroupBoostUpdateFailedError{} not identified correctly")
}
if !errors.Is(err2, UpdateQueryFailedError{}) {
t.Errorf("Assertion failed on GroupBoostUpdateFailed: UpdateQueryFailedError{} not identified correctly")
}
}
}
func TestGroupBoostDeleteFailed (t *testing.T) {
err1 := NewGroupBoostDeleteFailedError(nil)
{
err1, ok := err1.(GroupBoostDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on GroupBoostDeleteFailed: %T is not GroupBoostDeleteFailedError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on GroupBoostDeleteFailed: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 164 {
t.Errorf("Assertion failed on GroupBoostDeleteFailed: %d != 164", err1.Code())
}
if err1.Description() != "The delete record operation for group boost failed." {
t.Errorf("Assertion failed on GroupBoostDeleteFailed: %s != The delete record operation for group boost failed.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewGroupBoostDeleteFailedError(errThingNotFound)
{
err2, ok := err2.(GroupBoostDeleteFailedError)
if !ok {
t.Errorf("Assertion failed on GroupBoostDeleteFailed: %T is not GroupBoostDeleteFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 164 {
t.Errorf("Assertion failed on GroupBoostDeleteFailed: %d != 164", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on GroupBoostDeleteFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on GroupBoostDeleteFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, GroupBoostDeleteFailedError{}) {
t.Errorf("Assertion failed on GroupBoostDeleteFailed: GroupBoostDeleteFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, GroupBoostDeleteFailedError{}) {
t.Errorf("Assertion failed on GroupBoostDeleteFailed: GroupBoostDeleteFailedError{} not identified correctly")
}
if !errors.Is(err2, DeleteQueryFailedError{}) {
t.Errorf("Assertion failed on GroupBoostDeleteFailed: DeleteQueryFailedError{} not identified correctly")
}
}
}
func TestInvalidGroupBoost (t *testing.T) {
err1 := NewInvalidGroupBoostError(nil)
{
err1, ok := err1.(InvalidGroupBoostError)
if !ok {
t.Errorf("Assertion failed on InvalidGroupBoost: %T is not InvalidGroupBoostError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on InvalidGroupBoost: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 165 {
t.Errorf("Assertion failed on InvalidGroupBoost: %d != 165", err1.Code())
}
if err1.Description() != "The group boost is invalid." {
t.Errorf("Assertion failed on InvalidGroupBoost: %s != The group boost is invalid.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewInvalidGroupBoostError(errThingNotFound)
{
err2, ok := err2.(InvalidGroupBoostError)
if !ok {
t.Errorf("Assertion failed on InvalidGroupBoost: %T is not InvalidGroupBoostError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 165 {
t.Errorf("Assertion failed on InvalidGroupBoost: %d != 165", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on InvalidGroupBoost: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on InvalidGroupBoost: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, InvalidGroupBoostError{}) {
t.Errorf("Assertion failed on InvalidGroupBoost: InvalidGroupBoostError{} not identified correctly")
}
if !errors.Is(errNestErr2, InvalidGroupBoostError{}) {
t.Errorf("Assertion failed on InvalidGroupBoost: InvalidGroupBoostError{} not identified correctly")
}
}
}
func TestGroupBoostNotFound (t *testing.T) {
err1 := NewGroupBoostNotFoundError(nil)
{
err1, ok := err1.(GroupBoostNotFoundError)
if !ok {
t.Errorf("Assertion failed on GroupBoostNotFound: %T is not GroupBoostNotFoundError", err1)
}
if err1.Prefix() != "TAVDAT" {
t.Errorf("Assertion failed on GroupBoostNotFound: %s != TAVDAT", err1.Prefix())
}
if err1.Code() != 166 {
t.Errorf("Assertion failed on GroupBoostNotFound: %d != 166", err1.Code())
}
if err1.Description() != "The group boost was not found." {
t.Errorf("Assertion failed on GroupBoostNotFound: %s != The group boost was not found.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewGroupBoostNotFoundError(errThingNotFound)
{
err2, ok := err2.(GroupBoostNotFoundError)
if !ok {
t.Errorf("Assertion failed on GroupBoostNotFound: %T is not GroupBoostNotFoundError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 166 {
t.Errorf("Assertion failed on GroupBoostNotFound: %d != 166", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on GroupBoostNotFound: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on GroupBoostNotFound: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, GroupBoostNotFoundError{}) {
t.Errorf("Assertion failed on GroupBoostNotFound: GroupBoostNotFoundError{} not identified correctly")
}
if !errors.Is(errNestErr2, GroupBoostNotFoundError{}) {
t.Errorf("Assertion failed on GroupBoostNotFound: GroupBoostNotFoundError{} not identified correctly")
}
if !errors.Is(err2, NotFoundError{}) {
t.Errorf("Assertion failed on GroupBoostNotFound: NotFoundError{} not identified correctly")
}
}
}
func TestInvalidEmailVerification (t *testing.T) {
err1 := NewInvalidEmailVerificationError(nil)
{
err1, ok := err1.(InvalidEmailVerificationError)
if !ok {
t.Errorf("Assertion failed on InvalidEmailVerification: %T is not InvalidEmailVerificationError", err1)
}
if err1.Prefix() != "TAVWEB" {
t.Errorf("Assertion failed on InvalidEmailVerification: %s != TAVWEB", err1.Prefix())
}
if err1.Code() != 1 {
t.Errorf("Assertion failed on InvalidEmailVerification: %d != 1", err1.Code())
}
if err1.Description() != "Invalid verification." {
t.Errorf("Assertion failed on InvalidEmailVerification: %s != Invalid verification.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewInvalidEmailVerificationError(errThingNotFound)
{
err2, ok := err2.(InvalidEmailVerificationError)
if !ok {
t.Errorf("Assertion failed on InvalidEmailVerification: %T is not InvalidEmailVerificationError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 1 {
t.Errorf("Assertion failed on InvalidEmailVerification: %d != 1", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on InvalidEmailVerification: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on InvalidEmailVerification: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, InvalidEmailVerificationError{}) {
t.Errorf("Assertion failed on InvalidEmailVerification: InvalidEmailVerificationError{} not identified correctly")
}
if !errors.Is(errNestErr2, InvalidEmailVerificationError{}) {
t.Errorf("Assertion failed on InvalidEmailVerification: InvalidEmailVerificationError{} not identified correctly")
}
}
}
func TestCannotSaveSession (t *testing.T) {
err1 := NewCannotSaveSessionError(nil)
{
err1, ok := err1.(CannotSaveSessionError)
if !ok {
t.Errorf("Assertion failed on CannotSaveSession: %T is not CannotSaveSessionError", err1)
}
if err1.Prefix() != "TAVWEB" {
t.Errorf("Assertion failed on CannotSaveSession: %s != TAVWEB", err1.Prefix())
}
if err1.Code() != 2 {
t.Errorf("Assertion failed on CannotSaveSession: %d != 2", err1.Code())
}
if err1.Description() != "Cannot save session." {
t.Errorf("Assertion failed on CannotSaveSession: %s != Cannot save session.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewCannotSaveSessionError(errThingNotFound)
{
err2, ok := err2.(CannotSaveSessionError)
if !ok {
t.Errorf("Assertion failed on CannotSaveSession: %T is not CannotSaveSessionError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 2 {
t.Errorf("Assertion failed on CannotSaveSession: %d != 2", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on CannotSaveSession: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on CannotSaveSession: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, CannotSaveSessionError{}) {
t.Errorf("Assertion failed on CannotSaveSession: CannotSaveSessionError{} not identified correctly")
}
if !errors.Is(errNestErr2, CannotSaveSessionError{}) {
t.Errorf("Assertion failed on CannotSaveSession: CannotSaveSessionError{} not identified correctly")
}
}
}
func TestInvalidCaptcha (t *testing.T) {
err1 := NewInvalidCaptchaError(nil)
{
err1, ok := err1.(InvalidCaptchaError)
if !ok {
t.Errorf("Assertion failed on InvalidCaptcha: %T is not InvalidCaptchaError", err1)
}
if err1.Prefix() != "TAVWEB" {
t.Errorf("Assertion failed on InvalidCaptcha: %s != TAVWEB", err1.Prefix())
}
if err1.Code() != 3 {
t.Errorf("Assertion failed on InvalidCaptcha: %d != 3", err1.Code())
}
if err1.Description() != "Invalid captcha." {
t.Errorf("Assertion failed on InvalidCaptcha: %s != Invalid captcha.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewInvalidCaptchaError(errThingNotFound)
{
err2, ok := err2.(InvalidCaptchaError)
if !ok {
t.Errorf("Assertion failed on InvalidCaptcha: %T is not InvalidCaptchaError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 3 {
t.Errorf("Assertion failed on InvalidCaptcha: %d != 3", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on InvalidCaptcha: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on InvalidCaptcha: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, InvalidCaptchaError{}) {
t.Errorf("Assertion failed on InvalidCaptcha: InvalidCaptchaError{} not identified correctly")
}
if !errors.Is(errNestErr2, InvalidCaptchaError{}) {
t.Errorf("Assertion failed on InvalidCaptcha: InvalidCaptchaError{} not identified correctly")
}
}
}
func TestEmailSendFailed (t *testing.T) {
err1 := NewEmailSendFailedError(nil)
{
err1, ok := err1.(EmailSendFailedError)
if !ok {
t.Errorf("Assertion failed on EmailSendFailed: %T is not EmailSendFailedError", err1)
}
if err1.Prefix() != "TAVWEB" {
t.Errorf("Assertion failed on EmailSendFailed: %s != TAVWEB", err1.Prefix())
}
if err1.Code() != 4 {
t.Errorf("Assertion failed on EmailSendFailed: %d != 4", err1.Code())
}
if err1.Description() != "Unable to send email." {
t.Errorf("Assertion failed on EmailSendFailed: %s != Unable to send email.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewEmailSendFailedError(errThingNotFound)
{
err2, ok := err2.(EmailSendFailedError)
if !ok {
t.Errorf("Assertion failed on EmailSendFailed: %T is not EmailSendFailedError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 4 {
t.Errorf("Assertion failed on EmailSendFailed: %d != 4", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on EmailSendFailed: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on EmailSendFailed: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, EmailSendFailedError{}) {
t.Errorf("Assertion failed on EmailSendFailed: EmailSendFailedError{} not identified correctly")
}
if !errors.Is(errNestErr2, EmailSendFailedError{}) {
t.Errorf("Assertion failed on EmailSendFailed: EmailSendFailedError{} not identified correctly")
}
}
}
func TestAuthenticationRequired (t *testing.T) {
err1 := NewAuthenticationRequiredError(nil)
{
err1, ok := err1.(AuthenticationRequiredError)
if !ok {
t.Errorf("Assertion failed on AuthenticationRequired: %T is not AuthenticationRequiredError", err1)
}
if err1.Prefix() != "TAVWEB" {
t.Errorf("Assertion failed on AuthenticationRequired: %s != TAVWEB", err1.Prefix())
}
if err1.Code() != 5 {
t.Errorf("Assertion failed on AuthenticationRequired: %d != 5", err1.Code())
}
if err1.Description() != "Authentication required" {
t.Errorf("Assertion failed on AuthenticationRequired: %s != Authentication required", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewAuthenticationRequiredError(errThingNotFound)
{
err2, ok := err2.(AuthenticationRequiredError)
if !ok {
t.Errorf("Assertion failed on AuthenticationRequired: %T is not AuthenticationRequiredError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 5 {
t.Errorf("Assertion failed on AuthenticationRequired: %d != 5", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on AuthenticationRequired: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on AuthenticationRequired: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, AuthenticationRequiredError{}) {
t.Errorf("Assertion failed on AuthenticationRequired: AuthenticationRequiredError{} not identified correctly")
}
if !errors.Is(errNestErr2, AuthenticationRequiredError{}) {
t.Errorf("Assertion failed on AuthenticationRequired: AuthenticationRequiredError{} not identified correctly")
}
}
}
func TestTranslatorNotFound (t *testing.T) {
err1 := NewTranslatorNotFoundError(nil)
{
err1, ok := err1.(TranslatorNotFoundError)
if !ok {
t.Errorf("Assertion failed on TranslatorNotFound: %T is not TranslatorNotFoundError", err1)
}
if err1.Prefix() != "TAVWEB" {
t.Errorf("Assertion failed on TranslatorNotFound: %s != TAVWEB", err1.Prefix())
}
if err1.Code() != 6 {
t.Errorf("Assertion failed on TranslatorNotFound: %d != 6", err1.Code())
}
if err1.Description() != "Translator not found # Used when the underlying translation system isn't found." {
t.Errorf("Assertion failed on TranslatorNotFound: %s != Translator not found # Used when the underlying translation system isn't found.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewTranslatorNotFoundError(errThingNotFound)
{
err2, ok := err2.(TranslatorNotFoundError)
if !ok {
t.Errorf("Assertion failed on TranslatorNotFound: %T is not TranslatorNotFoundError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 6 {
t.Errorf("Assertion failed on TranslatorNotFound: %d != 6", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on TranslatorNotFound: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on TranslatorNotFound: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, TranslatorNotFoundError{}) {
t.Errorf("Assertion failed on TranslatorNotFound: TranslatorNotFoundError{} not identified correctly")
}
if !errors.Is(errNestErr2, TranslatorNotFoundError{}) {
t.Errorf("Assertion failed on TranslatorNotFound: TranslatorNotFoundError{} not identified correctly")
}
}
}
func TestTranslationNotFound (t *testing.T) {
err1 := NewTranslationNotFoundError(nil)
{
err1, ok := err1.(TranslationNotFoundError)
if !ok {
t.Errorf("Assertion failed on TranslationNotFound: %T is not TranslationNotFoundError", err1)
}
if err1.Prefix() != "TAVWEB" {
t.Errorf("Assertion failed on TranslationNotFound: %s != TAVWEB", err1.Prefix())
}
if err1.Code() != 7 {
t.Errorf("Assertion failed on TranslationNotFound: %d != 7", err1.Code())
}
if err1.Description() != "Translation not found" {
t.Errorf("Assertion failed on TranslationNotFound: %s != Translation not found", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewTranslationNotFoundError(errThingNotFound)
{
err2, ok := err2.(TranslationNotFoundError)
if !ok {
t.Errorf("Assertion failed on TranslationNotFound: %T is not TranslationNotFoundError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 7 {
t.Errorf("Assertion failed on TranslationNotFound: %d != 7", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on TranslationNotFound: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on TranslationNotFound: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, TranslationNotFoundError{}) {
t.Errorf("Assertion failed on TranslationNotFound: TranslationNotFoundError{} not identified correctly")
}
if !errors.Is(errNestErr2, TranslationNotFoundError{}) {
t.Errorf("Assertion failed on TranslationNotFound: TranslationNotFoundError{} not identified correctly")
}
}
}
func TestInvalidUserID (t *testing.T) {
err1 := NewInvalidUserIDError(nil)
{
err1, ok := err1.(InvalidUserIDError)
if !ok {
t.Errorf("Assertion failed on InvalidUserID: %T is not InvalidUserIDError", err1)
}
if err1.Prefix() != "TAVWEB" {
t.Errorf("Assertion failed on InvalidUserID: %s != TAVWEB", err1.Prefix())
}
if err1.Code() != 8 {
t.Errorf("Assertion failed on InvalidUserID: %d != 8", err1.Code())
}
if err1.Description() != "The user id is invalid." {
t.Errorf("Assertion failed on InvalidUserID: %s != The user id is invalid.", err1.Description())
}
}
errNotFound := fmt.Errorf("not found")
errThingNotFound := fmt.Errorf("thing: %w", errNotFound)
err2 := NewInvalidUserIDError(errThingNotFound)
{
err2, ok := err2.(InvalidUserIDError)
if !ok {
t.Errorf("Assertion failed on InvalidUserID: %T is not InvalidUserIDError", err2)
}
errNestErr2 := fmt.Errorf("oh snap: %w", err2)
if err2.Code() != 8 {
t.Errorf("Assertion failed on InvalidUserID: %d != 8", err2.Code())
}
if !errors.Is(err2, errNotFound) {
t.Errorf("Assertion failed on InvalidUserID: errNotFound not unwrapped correctly")
}
if !errors.Is(err2, errThingNotFound) {
t.Errorf("Assertion failed on InvalidUserID: errThingNotFound not unwrapped correctly")
}
if !errors.Is(err2, InvalidUserIDError{}) {
t.Errorf("Assertion failed on InvalidUserID: InvalidUserIDError{} not identified correctly")
}
if !errors.Is(errNestErr2, InvalidUserIDError{}) {
t.Errorf("Assertion failed on InvalidUserID: InvalidUserIDError{} not identified correctly")
}
}
}