public void Should_Succeed_When_Executing_CreateIfNotExists_Multiple_Times()
        {
            var connectionFactory = new SqliteInMemoryConnection();


            var x = new SqliteQueueManager(connectionFactory, new DefaultSqlQueueTableNameEncoder());

            x.CreateCoreTablesIfNotExist();
            x.CreateCoreTablesIfNotExist();
            x.CreateCoreTablesIfNotExist();
        }
        public void Objects_Should_Be_Created_On_Empty_Database()
        {
            var connectionFactory = new SqliteInMemoryConnection();

            var x = new SqliteQueueManager(connectionFactory, new DefaultSqlQueueTableNameEncoder());

            x.CreateCoreTablesIfNotExist();
        }
Exemple #3
0
        public void SetupQueue()
        {
            var x = new SqliteQueueManager(new SqliteInMemoryConnection(), new DefaultSqlQueueTableNameEncoder());

            x.CreateCoreTablesIfNotExist();
            x.CreateQueueIfNotExist("TestQueue");

            Queue = new SqlQueue("Queue_TestQueue", x.Connection);
        }
        public void Should_Not_Fail_Even_If_Queue_Already_Exist()
        {
            var connectionFactory = new SqliteInMemoryConnection();

            var x = new SqliteQueueManager(connectionFactory, new DefaultSqlQueueTableNameEncoder());

            x.CreateCoreTablesIfNotExist();

            x.CreateQueueIfNotExist("SomeQueue");
            x.CreateQueueIfNotExist("SomeQueue");
        }
        public void Should_Succed_On_Multiple_Queues()
        {
            var connectionFactory = new SqliteInMemoryConnection();

            var x = new SqliteQueueManager(connectionFactory, new DefaultSqlQueueTableNameEncoder());

            x.CreateCoreTablesIfNotExist();

            x.CreateQueueIfNotExist("SomeQueue1");
            x.CreateQueueIfNotExist("SomeQueue2");


            var queue1 = x.OpenQueue("SomeQueue1");
            var queue2 = x.OpenQueue("SomeQueue2");
        }