From a3388622287e218beddfa14a47ed677d4307b36b Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Fri, 25 Mar 2016 17:55:51 +0100 Subject: Removed simpletest and moved all tests in the unit tree Tests are executed now, but a lot of them need fixing. --- tests/simple_unit/SqlMap/maps/mssql/Account.xml | 606 --------------------- tests/simple_unit/SqlMap/maps/mssql/Category.xml | 171 ------ tests/simple_unit/SqlMap/maps/mssql/Complex.xml | 21 - tests/simple_unit/SqlMap/maps/mssql/Document.xml | 53 -- .../SqlMap/maps/mssql/DynamicAccount.xml | 438 --------------- .../simple_unit/SqlMap/maps/mssql/Enumeration.xml | 47 -- tests/simple_unit/SqlMap/maps/mssql/LineItem.xml | 182 ------- tests/simple_unit/SqlMap/maps/mssql/Order.xml | 475 ---------------- tests/simple_unit/SqlMap/maps/mssql/Other.xml | 171 ------ .../simple_unit/SqlMap/maps/mssql/ResultClass.xml | 125 ----- 10 files changed, 2289 deletions(-) delete mode 100644 tests/simple_unit/SqlMap/maps/mssql/Account.xml delete mode 100644 tests/simple_unit/SqlMap/maps/mssql/Category.xml delete mode 100644 tests/simple_unit/SqlMap/maps/mssql/Complex.xml delete mode 100644 tests/simple_unit/SqlMap/maps/mssql/Document.xml delete mode 100644 tests/simple_unit/SqlMap/maps/mssql/DynamicAccount.xml delete mode 100644 tests/simple_unit/SqlMap/maps/mssql/Enumeration.xml delete mode 100644 tests/simple_unit/SqlMap/maps/mssql/LineItem.xml delete mode 100644 tests/simple_unit/SqlMap/maps/mssql/Order.xml delete mode 100644 tests/simple_unit/SqlMap/maps/mssql/Other.xml delete mode 100644 tests/simple_unit/SqlMap/maps/mssql/ResultClass.xml (limited to 'tests/simple_unit/SqlMap/maps/mssql') diff --git a/tests/simple_unit/SqlMap/maps/mssql/Account.xml b/tests/simple_unit/SqlMap/maps/mssql/Account.xml deleted file mode 100644 index 2e8dc1ce..00000000 --- a/tests/simple_unit/SqlMap/maps/mssql/Account.xml +++ /dev/null @@ -1,606 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - insert into Accounts - (Account_ID, Account_FirstName, Account_LastName, Account_Email, Account_Banner_Option, Account_Cart_Option) - values - (?, ?, ?, ?, ?, ?) - - - - update Accounts set - Account_FirstName = ?, - Account_LastName = ?, - Account_Email = ? - where - Account_ID = ? - - - - update Accounts set - Account_ID = ?, - Account_FirstName = ?, - Account_LastName = ?, - Account_Email = ? - where - Account_ID = ? - - - - delete from Accounts - where - Account_ID = #Id# - - - - - - - - - - - - - - insert into Accounts - (Account_ID, Account_FirstName, Account_LastName, Account_Email) - values - (#Id#, #FirstName#, #LastName#, #EmailAddress# - ) - - - - - update Accounts set - Account_FirstName = #FirstName#, - Account_LastName = #LastName#, - Account_Email = #EmailAddress, nullValue=no_email@provided.com# - where - Account_ID = #Id# - - - - insert into Accounts - (Account_ID, Account_FirstName, Account_LastName, Account_Email) - values - (#Id#, #FirstName#, #LastName#, #EmailAddress, nullValue=no_email@provided.com# - ) - - - - insert into Accounts - (Account_ID, Account_FirstName, Account_LastName, Account_Email) - values - ( #Id#, #FirstName#, #LastName#, #EmailAddress, dbType=VarChar# ) - - - - insert into Accounts - (Account_ID, Account_FirstName, Account_LastName, Account_Email) - values - ( #Id#, #FirstName#, #LastName#, #EmailAddress, dbType=VarChar# ) - - - - delete from Accounts - where Account_ID = #Id, type=integer# - and Account_ID = #Id, type=integer# - - - - - - - - - - - - - - - - - - - - - - - - - - - - Accounts - - - - - INSERT INTO Accounts - (Account_ID, Account_FirstName, Account_LastName, Account_Email) - VALUES(#Id#, #FirstName#, #LastName# - - - #EmailAddress# - - - null - - - ) - - - - - ps_InsertAccount - - - - ps_swap_email_address - - - - ps_SelectAccount - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/simple_unit/SqlMap/maps/mssql/Category.xml b/tests/simple_unit/SqlMap/maps/mssql/Category.xml deleted file mode 100644 index b0e004a5..00000000 --- a/tests/simple_unit/SqlMap/maps/mssql/Category.xml +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - - - insert into Categories - (Category_Name, Category_Guid) - values - (#Name#, #Guid:UniqueIdentifier#); - select SCOPE_IDENTITY() as value - - - - - insert into Categories - (Category_Name, Category_Guid) - values - ('toto', #value:UniqueIdentifier#); - select SCOPE_IDENTITY() as value - - - - - insert into Categories - (Category_Name, Category_Guid) - values - ('toto', #value#); - select SCOPE_IDENTITY() as value - - - - - ${selectKey} - - insert into Categories - (Category_Name, Category_Guid) - values - (#Name#, #Guid:UniqueIdentifier#) - - - - - ${selectKey} - - insert into Categories - (Category_Name, Category_Guid) - values - (${MyCategoryName}, #Guid:UniqueIdentifier#) - - - - insert into Categories - (Category_Name, Category_Guid) - values - (?,?); - select SCOPE_IDENTITY() as value - - - - insert into Categories - (Category_Name, Category_Guid) - values - (?,?); - select SCOPE_IDENTITY() as value - - - - update Categories set - Category_Name =?, - Category_Guid = ? - where - Category_Id = ? - - - - ps_InsertCategorie - - - - - select @@IDENTITY as value - - - - - - - - - - - - - - - - - - select - Category_ID as Id, - Category_Name as Name, - Category_Guid as Guid - from Categories - - - Category_Guid=#Guid:UniqueIdentifier# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/simple_unit/SqlMap/maps/mssql/Complex.xml b/tests/simple_unit/SqlMap/maps/mssql/Complex.xml deleted file mode 100644 index 5a1bbf9c..00000000 --- a/tests/simple_unit/SqlMap/maps/mssql/Complex.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - select Account_ID from Accounts where Account_ID = #obj.Map.Id# - - - - insert into Accounts - (Account_ID, Account_FirstName, Account_LastName, Account_Email) - values - (#obj.Map.acct.Id#, #obj.Map.acct.FirstName#, #obj.Map.acct.LastName#, #obj.Map.acct.EmailAddress:VarChar:no_email@provided.com# - ) - - - - - diff --git a/tests/simple_unit/SqlMap/maps/mssql/Document.xml b/tests/simple_unit/SqlMap/maps/mssql/Document.xml deleted file mode 100644 index 5c9b6b14..00000000 --- a/tests/simple_unit/SqlMap/maps/mssql/Document.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/simple_unit/SqlMap/maps/mssql/DynamicAccount.xml b/tests/simple_unit/SqlMap/maps/mssql/DynamicAccount.xml deleted file mode 100644 index 355ef4f8..00000000 --- a/tests/simple_unit/SqlMap/maps/mssql/DynamicAccount.xml +++ /dev/null @@ -1,438 +0,0 @@ - - - - - - - - - SELECT - Account_ID as Id, - - - Account_FirstName as FirstName, - - - Account_LastName as LastName, - - - - Account_Email as EmailAddress - FROM - Accounts - - - - select - Account_ID as Id, - Account_FirstName as FirstName, - Account_LastName as LastName, - Account_Email as EmailAddress - from Accounts - - where Account_FirstName = 'Joe' - - - - - select - Account_ID as Id, - Account_FirstName as FirstName, - Account_LastName as LastName, - Account_Email as EmailAddress - from Accounts - - where Account_ID = #value# - - - - - select - Account_ID as Id, - Account_FirstName as FirstName, - Account_LastName as LastName, - Account_Email as EmailAddress - from Accounts - - where Account_FirstName = #value# - - - - - select - Account_ID as Id, - Account_FirstName as FirstName, - Account_LastName as LastName, - Account_Email as EmailAddress - from Accounts - - where Account_ID = 1 - - - - - select - Account_ID as Id, - Account_FirstName as FirstName, - Account_LastName as LastName, - Account_Email as EmailAddress - from Accounts - - where Account_ID = 1 - - - - - select - Account_ID as Id, - Account_FirstName as FirstName, - Account_LastName as LastName, - Account_Email as EmailAddress - from Accounts - - where Account_ID = 1 - - - - - select - Account_ID as Id, - Account_FirstName as FirstName, - Account_LastName as LastName, - Account_Email as EmailAddress - from Accounts - - where Account_ID = 1 - - - - - select - Account_ID as Id, - Account_FirstName as FirstName, - Account_LastName as LastName, - Account_Email as EmailAddress - from Accounts - - where Account_ID = 1 - - - - - select - Account_ID as Id, - Account_FirstName as FirstName, - Account_LastName as LastName, - Account_Email as EmailAddress - from Accounts - - where Account_ID = 1 - - - - - - - $statement$ - - - - - select - Account_ID as Id, - Account_FirstName as FirstName, - Account_LastName as LastName, - Account_Email as EmailAddress - from Accounts - WHERE Account_ID IN - - #[]# - - - - - select - Account_ID as Id, - Account_FirstName as FirstName, - Account_LastName as LastName, - Account_Email as EmailAddress - from Accounts - WHERE Account_ID IN - - #Ids[]# - - - - - select - Account_ID as Id, - Account_FirstName as FirstName, - Account_LastName as LastName, - Account_Email as EmailAddress - from Accounts - WHERE Account_ID IN - - #[]# - - and Account_ID IN - - #[]# - - - - - - select - Account_ID as Id, - Account_FirstName as FirstName, - Account_LastName as LastName, - Account_Email as EmailAddress - from Accounts - - - Account_ID = #Id# - - - Account_ID in - - #Ids[]# - - - - Account_FirstName = #FirstName# - - - Account_LastName = #LastName# - - - - Account_Email = 'clinton.begin@ibatis.com' - - - Account_Email = #EmailAddress# - - - - - - - select - Account_ID as Id, - Account_FirstName as FirstName, - Account_LastName as LastName, - Account_Email as EmailAddress - from Accounts - - Account_ID IN - - #[]# - - - - - - select - Account_ID as Id, - Account_FirstName as FirstName, - Account_LastName as LastName, - Account_Email as EmailAddress - from Accounts - - - Account_ID = #[]# - - - - - - select - Account_ID as Id, - Account_FirstName as FirstName, - Account_LastName as LastName, - Account_Email as EmailAddress - from Accounts - - - - Account_ID = #[]# - - - - - - - select - Account_ID as Id, - Account_FirstName as FirstName, - Account_LastName as LastName, - Account_Email as EmailAddress - from Accounts - - - - Account_ID = #Id# - - - Account_FirstName = #FirstName# - - - Account_LastName = #LastName# - - - - - - - select - Account_ID as Id, - Account_FirstName as FirstName, - Account_LastName as LastName, - Account_Email as EmailAddress - from Accounts - - - Account_ID = #Id# - - - - - Account_FirstName = #FirstName# - - - Account_LastName = #LastName# - - - - - - select - Account_ID as Id, - Account_FirstName as FirstName, - Account_LastName as LastName, - Account_Email as EmailAddress - from Accounts - - - (Account_FirstName = #FirstName# - - Account_LastName = #LastName# - - ) - - - Account_Email like #EmailAddress# - - - Account_ID = #Id# - - - order by Account_LastName - - - - select - Account_ID as Id, - Account_FirstName as FirstName, - Account_LastName as LastName, - Account_Email as EmailAddress - from Accounts - - - ((Account_ID $Operande$ #NumberSearch#) or - (Account_ID $Operande$ #NumberSearch#)) - - - = #StartDate# ]]> - - - = #StartDate# ]]> - - - - order by Account_LastName - - \ No newline at end of file diff --git a/tests/simple_unit/SqlMap/maps/mssql/Enumeration.xml b/tests/simple_unit/SqlMap/maps/mssql/Enumeration.xml deleted file mode 100644 index 938a4266..00000000 --- a/tests/simple_unit/SqlMap/maps/mssql/Enumeration.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - insert into Enumerations - (Enum_ID, Enum_Day, Enum_Color, Enum_Month) - values - (?, ?, ?, ?) - - - - - - - - - - diff --git a/tests/simple_unit/SqlMap/maps/mssql/LineItem.xml b/tests/simple_unit/SqlMap/maps/mssql/LineItem.xml deleted file mode 100644 index ced09b52..00000000 --- a/tests/simple_unit/SqlMap/maps/mssql/LineItem.xml +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - select - LineItem_Price - from LineItems - where Order_ID = #Order_ID# - and LineItem_ID = #LineItem_ID# - - - - select - LineItem_ID as Id, - LineItem_Code as Code, - LineItem_Quantity as Quantity, - LineItem_Price as Price - from LineItems where Order_ID = #value# - - - - select - LineItem_ID as Id, - LineItem_Code as Code, - LineItem_Quantity as Quantity, - LineItem_Price as Price - from LineItems where Order_ID = #value# - order by LineItem_Code - - - - select - LineItem_ID as Id, - LineItem_Code as Code, - LineItem_Quantity as Quantity, - LineItem_Price as Price - from LineItems - where Order_ID = #Order_ID# - and LineItem_ID = #LineItem_ID# - - - - select - LineItem_ID as Id, - LineItem_Code as Code, - LineItem_Quantity as Quantity, - LineItem_Price as Price, - LineItem_Picture as PictureData - from LineItems - where Order_ID = #Order_ID# - and LineItem_ID = #LineItem_ID# - - - - - - select - LineItem_ID, - LineItem_Code, - LineItem_Quantity, - LineItem_Price - from LineItems - where LineItem_ID = #value# - - - - insert into LineItems - (LineItem_ID, Order_ID, LineItem_Code, LineItem_Quantity, LineItem_Price) - values - (?, ?, ?, ?, ?); - - - - insert into LineItems - (LineItem_ID, Order_ID, LineItem_Code, LineItem_Quantity, LineItem_Price, LineItem_Picture) - values - (?, ?, ?, ?, ?, ?); - - - - insert into LineItems - (LineItem_ID, Order_ID, LineItem_Code, LineItem_Quantity, LineItem_Price) - values - (#Id#, #Order.Id#, #Code#, #Quantity#, #Price, dbType=Decimal#) - - select 99 from LineItems where LineItem_ID = 1 and Order_ID=1 - - - - - - select 99 from LineItems where LineItem_ID = 1 and Order_ID=1 - - insert into LineItems - (LineItem_ID, Order_ID, LineItem_Code, LineItem_Quantity, LineItem_Price) - values - (#Id#, #Order.Id#, #Code#, #Quantity#, #Price, dbType=Decimal#) - - - - insert into LineItems - (LineItem_ID, Order_ID, LineItem_Code, LineItem_Quantity, LineItem_Price) - values - (#Id#, #Order.Id#, #Code#, #Quantity#, #Price, dbType=Decimal#) - - - - - - delete from LineItems where Order_ID = 10 - - delete from LineItems where Order_ID = 9 - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/simple_unit/SqlMap/maps/mssql/Order.xml b/tests/simple_unit/SqlMap/maps/mssql/Order.xml deleted file mode 100644 index 14c9586a..00000000 --- a/tests/simple_unit/SqlMap/maps/mssql/Order.xml +++ /dev/null @@ -1,475 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - select Order_Date from Orders where Order_ID = #value# - - - - select * from Orders where Order_ID = #value# - - - - select - Order_ID, - Order_Date, - Order_CardExpiry, - Order_CardType, - Order_CardNumber, - Order_Street, - Order_City, - Order_Province, - Order_PostalCode - from Orders where Order_ID = #value# - - - - select * from Orders where Order_ID = #value# - - - - select * from Orders where Order_ID = #value# - - - - select * from Orders where Order_ID = #value# - - - - select * from Orders - - - - select - Order_Date as datetime - from Orders where Order_ID = #value# - - - - select * from Orders where Order_ID = #value# - - - - select * from Orders where Order_ID = #value# - - - - select * from Orders where Order_ID = #value# - - - - select * from Orders, LineItems - where Orders.Order_ID = LineItems.Order_ID - and Order_FavouriteLineItem = LineItems.LineItem_ID - and Orders.Order_ID = #value# - - - - select * from Orders, LineItems - where Orders.Order_ID = LineItems.Order_ID - and Order_FavouriteLineItem = LineItems.LineItem_ID - and Orders.Order_ID = #value# - - - - select - Orders.Order_ID as Id, - Order_Date as Date, - Order_CardExpiry as CardExpiry, - Order_CardType as CardType, - Order_CardNumber as CardNumber, - Order_Street as Street, - Order_City as City, - Order_Province as Province, - Order_PostalCode as PostalCode, - LineItem_ID as "FavouriteLineItem.Id", - LineItem_Code as "FavouriteLineItem.Code", - LineItem_Quantity as "FavouriteLineItem.Quantity", - LineItem_Price as "FavouriteLineItem.Price" - from Orders, LineItems - where Orders.Order_ID = LineItems.Order_ID - and Order_FavouriteLineItem = LineItems.LineItem_ID - and Orders.Order_ID = #value# - - - - select * from Orders where Order_ID = #value# - - - - select * from Orders where Order_ID = #value# - - - - select * from Orders where Order_ID = #value# - - - - select * from Orders where Order_ID = #value# - - - - select distinct Order_CardNumber from Orders - order by Order_CardNumber - - - - insert into Orders - (Order_ID, Account_ID, Order_Date, Order_CardExpiry, Order_CardType, - Order_CardNumber, Order_Street, Order_City, Order_Province, Order_PostalCode ) - values - (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) - - - - insert into Orders - (Order_ID, Account_ID, Order_Date, Order_CardExpiry, Order_CardType, - Order_CardNumber, Order_Street, Order_City, Order_Province, Order_PostalCode ) - values - (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) - - - - insert into Orders - (Order_ID, Account_ID, Order_Date, Order_CardExpiry, Order_CardType, - Order_CardNumber, Order_Street, Order_City, Order_Province, Order_PostalCode ) - values - (#Id#, #Account.Id#, #Date#, #CardExpiry#, #CardType#, #CardNumber#, #Street#, #City#, #Province#, #PostalCode#) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - select * from Orders where Order_ID = #value# - - - - - - - - select * from Orders where Order_ID = #value# - - - - - - - \ No newline at end of file diff --git a/tests/simple_unit/SqlMap/maps/mssql/Other.xml b/tests/simple_unit/SqlMap/maps/mssql/Other.xml deleted file mode 100644 index fa250a5a..00000000 --- a/tests/simple_unit/SqlMap/maps/mssql/Other.xml +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - select - Other_Int, - Other_Long, - Other_Bit, - Other_String - from Others - - - Other_Int = #year# - - - - Other_Long = #areaid# - - - - - - select - Other_Int, - Other_Long, - Other_Bit, - Other_String - from Others - Where Other_Bit = #Bool# - - - - Insert into Others - ( Other_Int, Other_Long, Other_Bit, Other_String ) - values - ( #Int#, #Long#, #Bool#, 'Yes') - - - - Insert into Others - ( Other_Int, Other_Long, Other_Bit, Other_String ) - values - ( ?, ?, ?, ?) - - - - select - Other_Int, - Other_Long, - Other_Bit, - Other_String - from Others - Where Other_Int = #value# - - - - Insert into Others - ( Other_Int, Other_Long, Other_Bit, Other_String ) - values - ( #Int#, #Long#, #Bool#, #Bool2,type=bool,dbType=Varchar#) - - - - Insert into Others - ( Other_Int, Other_Long, Other_Bit, Other_String ) - values - ( #Int#, #Long#, #Bool#, #Bool2,typeHandler=OuiNonBool#) - - - - - - - - - - - - select - Other_Int, - Other_Long, - Other_Bit, - Other_String - from Others - Where Other_Int = #value# - - - - - - - - - - - diff --git a/tests/simple_unit/SqlMap/maps/mssql/ResultClass.xml b/tests/simple_unit/SqlMap/maps/mssql/ResultClass.xml deleted file mode 100644 index f6ccfbce..00000000 --- a/tests/simple_unit/SqlMap/maps/mssql/ResultClass.xml +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - select cast(1 as bit) from Orders where Order_ID = #dummy# - - - - - - select cast(155 as tinyint) from Orders where Order_ID = #value# - - - - - - select cast('a' as char) from Orders where Order_ID = #value# - - - - - - - select cast('2003-02-15 8:15:00' as datetime) as datetime from Orders where Order_ID = #value# - - - - - - select cast(1.56 as decimal(9,2)) from Orders where Order_ID = #value# - - - - - - select cast(99.5 as float) from Orders where Order_ID= #value# - - - - - - select cast('CD5ABF17-4BBC-4C86-92F1-257735414CF4' as UniqueIdentifier) from Orders where Order_ID = #value# - - - - - - select cast(32111 as SmallInt) from Orders where Order_ID = #value# - - - - - - select cast(999999 as int) from Orders where Order_ID = #value# - - - - - - select cast(9223372036854775800 as bigint) from Orders where Order_ID = #value# - - - - - - select cast(92233.5 as real) from Orders where Order_ID = #value# - - - - - - select 'VISA' - from Orders where Order_ID = #value# - - - - - \ No newline at end of file -- cgit v1.2.3