Exemplo n.º 1
0
        public BaseFibonacciTest(TestDatabaseFixture testDatabase)
        {
            this.TestDatabase = testDatabase;

            Use.Transaction(TestDatabase.ConnectionStringName, cmd =>
            {
                cmd.CommandText =
                    @"
if object_id('Fibonacci') is not null
    drop table Fibonacci
create table Fibonacci ( id int );
";
                cmd.ExecuteNonQuery();
            });
        }
        public BaseUserToPeopleTest(TestDatabaseFixture testDatabase)
        {
            this.TestDatabase = testDatabase;

            Use.Transaction(TestDatabase.ConnectionStringName, cmd =>
            {
                cmd.CommandText =
                    @"
if object_id('User2Role') is not null
    drop table User2Role;
if object_id('Roles') is not null
    drop table Roles;
if object_id('Users') is not null
    drop table Users;

create table Users ( id int identity primary key, name nvarchar(255) not null, email nvarchar(255) not null, roles nvarchar(255), testMsg nvarchar(255) );
create table Roles( id int identity, name nvarchar(255) );


create table User2Role( userid int, roleid int);

insert into users (name,email) values('ayende rahien', '*****@*****.**')
insert into users (name,email) values('foo bar', '*****@*****.**')
insert into users (name,email) values('nice naughty', '*****@*****.**')
insert into users (name,email) values('gold silver', '*****@*****.**')


insert into roles values('admin')
insert into roles values('janitor')
insert into roles values('employee')
insert into roles values('customer')

insert into User2Role values(1,1)
insert into User2Role values(1,2)
insert into User2Role values(1,3)
insert into User2Role values(1,4)
insert into User2Role values(2,2)
insert into User2Role values(4,2)
insert into User2Role values(4,3)

if object_id('People') is not null
    drop table People;
create table People ( id int identity, userid int not null, firstname nvarchar(255) not null, lastname nvarchar(255) not null, email nvarchar(255) not null);
";
                cmd.ExecuteNonQuery();
            });
        }
Exemplo n.º 3
0
 /// <inheritdoc />
 public OutputCommandFixture(TestDatabaseFixture testDatabase)
     : base(testDatabase)
 {
 }
Exemplo n.º 4
0
 public SqlBatchOperationFixture(TestDatabaseFixture testDatabase)
     : base(testDatabase)
 {
 }
Exemplo n.º 5
0
 public BulkInsertNotificationTests(TestDatabaseFixture testDatabase)
     : base(testDatabase)
 {
 }
Exemplo n.º 6
0
 public SqlBulkInsertOperationFixture(TestDatabaseFixture testDatabase)
     : base(testDatabase)
 {
 }