cleaning up DB schema creation scripts for integration tests
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
CREATE PROCEDURE CreateTestObject
|
||||
{
|
||||
@Age int,
|
||||
@Name varchar(15)
|
||||
} AS
|
||||
|
||||
INSERT INTO into TestObjects(Age, Name) VALUES (@Age, @Name)
|
||||
@@ -1,51 +0,0 @@
|
||||
USE [CreditsAndDebits]
|
||||
CREATE TABLE [Credits](
|
||||
[CreditID] [int] IDENTITY NOT NULL,
|
||||
[CreditAmount] [float] NOT NULL,
|
||||
CONSTRAINT [PK_CreditID] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[CreditID] ASC
|
||||
) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
|
||||
USE [CreditsAndDebits]
|
||||
GO
|
||||
CREATE TABLE [Debits](
|
||||
[DebitID] [int] IDENTITY NOT NULL,
|
||||
[DebitAmount] [float] NOT NULL,
|
||||
CONSTRAINT [PK_DebitID] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[DebitID] ASC
|
||||
) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
|
||||
|
||||
USE [Credits]
|
||||
GO
|
||||
CREATE TABLE [Credits](
|
||||
[CreditID] [int] IDENTITY NOT NULL,
|
||||
[CreditAmount] [float] NOT NULL,
|
||||
CONSTRAINT [PK_CreditID] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[CreditID] ASC
|
||||
) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
|
||||
USE [Debits]
|
||||
GO
|
||||
CREATE TABLE [Debits](
|
||||
[DebitID] [int] IDENTITY NOT NULL,
|
||||
[DebitAmount] [float] NOT NULL,
|
||||
CONSTRAINT [PK_DebitID] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[DebitID] ASC
|
||||
) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,65 +0,0 @@
|
||||
|
||||
|
||||
USE Spring
|
||||
CREATE TABLE TestObjects
|
||||
(
|
||||
TestObjectNo int IDENTITY NOT NULL,
|
||||
Age int,
|
||||
Name varchar(50)
|
||||
)
|
||||
|
||||
|
||||
CREATE PROCEDURE SelectByName
|
||||
(
|
||||
@Name varchar(50)
|
||||
|
||||
)
|
||||
|
||||
as
|
||||
select TestObjectNo, Age,Name from TestObjects where Name = @Name
|
||||
|
||||
return
|
||||
|
||||
CREATE PROCEDURE SelectByNameWithReturnValue
|
||||
(
|
||||
@Name varchar(50)
|
||||
|
||||
)
|
||||
|
||||
as
|
||||
select * from TestObjects where Name = @Name
|
||||
|
||||
return 5
|
||||
|
||||
|
||||
CREATE PROCEDURE SelectByNameWithReturnAndOutValue
|
||||
(
|
||||
@Name varchar(50),
|
||||
@Count int output
|
||||
|
||||
)
|
||||
|
||||
as
|
||||
select * from TestObjects where Name = @Name
|
||||
set @Count = 10
|
||||
return 5
|
||||
|
||||
|
||||
CREATE PROCEDURE CreateTestObject
|
||||
(
|
||||
@Name varchar(50),
|
||||
@Age int
|
||||
)
|
||||
|
||||
as
|
||||
insert into TestObjects(Name, Age) Values (@Name, @Age)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
INSERT INTO TestObjects
|
||||
(Age, Name)
|
||||
VALUES
|
||||
(1, 'Gabriel')
|
||||
|
||||
@@ -195,10 +195,11 @@
|
||||
<EmbeddedResource Include="Data\TestTxIsolationLevel.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Data\CreateTestObject.sql" />
|
||||
<Content Include="Data\CreditsDebitsSchema.sql" />
|
||||
<Content Include="Data\DTC1.1AppContext.xml" />
|
||||
<Content Include="Data\testobjects-sqlserver.sql" />
|
||||
<Content Include="Data\Spring.Data.Integration.Tests_CreditsAndDebits_database.sql" />
|
||||
<Content Include="Data\Spring.Data.Integration.Tests_Credits_database.sql" />
|
||||
<Content Include="Data\Spring.Data.Integration.Tests_Debits_database.sql" />
|
||||
<Content Include="Data\Spring.Data.Integration.Tests_Spring_database.sql" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
|
||||
Reference in New Issue
Block a user