public MongoDbProcessManagerFinderTests()
        {
            _connectionString = "mongodb://localhost/";
            _dbName = "ProcessManagerRepository";
            var mongoClient = new MongoClient(_connectionString);
            MongoServer server = mongoClient.GetServer();
            MongoDatabase mongoDatabase = server.GetDatabase(_dbName);
            _collection = mongoDatabase.GetCollection<TestData>("TestData");
            _collection.Drop();

            _mapper = new ProcessManagerPropertyMapper();
            _mapper.ConfigureMapping<IProcessManagerData, Message>(m => m.CorrelationId, pm => pm.CorrelationId);
        }
        public MongoDbProcessManagerFinderTests()
        {
            _connectionString = "mongodb://localhost/";
            _dbName = "ProcessManagerRepository";
            var mongoClient = new MongoClient(_connectionString);
            MongoServer server = mongoClient.GetServer();
            MongoDatabase mongoDatabase = server.GetDatabase(_dbName);
            _collection = mongoDatabase.GetCollection<TestData>("TestData");
            _collection.Drop();

            _mapper = new ProcessManagerPropertyMapper();
            _mapper.ConfigureMapping<IProcessManagerData, Message>(m => m.CorrelationId, pm => pm.CorrelationId);
        }
Exemplo n.º 3
0
        public MongoDbSslProcessManagerFinderTests()
        {
            _dbName           = "ScTestProcessManagerRepository";
            _connectionString = string.Format("nodes={0},username={1},password={2},cert={3}",
                                              "xxx",
                                              "xxx",
                                              "xxx",
                                              "xxx");

            _mapper = new ProcessManagerPropertyMapper();
            _mapper.ConfigureMapping <IProcessManagerData, Message>(m => m.CorrelationId, pm => pm.CorrelationId);

            var testRepo = new MongoDbSslRepository(_connectionString, _dbName);

            testRepo.MongoDatabase.DropCollection("TestDataSsl");
        }
        public SqlServerProcessManagerFinderTest()
        {
            _connectionString = @"Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\MyLocalDb.mdf;Integrated Security=True";

            // DROP TABLE before each test
            using (var connection = new SqlConnection(_connectionString))
            {
                connection.Open();
                using (var command = new SqlCommand())
                {
                    command.Connection = connection;
                    command.CommandText = "IF EXISTS ( SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'TestSqlServerData') " +
                        "DROP TABLE TestSqlServerData;";
                    command.ExecuteNonQuery();
                }
            }

            _mapper = new ProcessManagerPropertyMapper();
            _mapper.ConfigureMapping<IProcessManagerData, Message>(m => m.CorrelationId, pm => pm.CorrelationId);
        }
        public SqlServerProcessManagerFinderTest()
        {
            var appBasePath = PlatformServices.Default.Application.ApplicationBasePath;

            //_connectionString = @"Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\MyLocalDb.mdf;Integrated Security=True";
            _connectionString = string.Format(@"Data Source=(LocalDB)\v11.0;AttachDbFilename={0};Integrated Security=True", Path.Combine(appBasePath, "MyLocalDb.mdf"));

            // DROP TABLE before each test
            using (var connection = new SqlConnection(_connectionString))
            {
                connection.Open();
                using (var command = new SqlCommand())
                {
                    command.Connection  = connection;
                    command.CommandText = "IF EXISTS ( SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'TestSqlServerData') " +
                                          "DROP TABLE TestSqlServerData;";
                    command.ExecuteNonQuery();
                }
            }

            _mapper = new ProcessManagerPropertyMapper();
            _mapper.ConfigureMapping <IProcessManagerData, Message>(m => m.CorrelationId, pm => pm.CorrelationId);
        }
 public InMemoryProcessManagerFinderTests()
 {
     _mapper = new ProcessManagerPropertyMapper();
     _mapper.ConfigureMapping<IProcessManagerData, Message>(m => m.CorrelationId, pm => pm.CorrelationId);
 }
Exemplo n.º 7
0
 public InMemoryProcessManagerFinderTests()
 {
     _mapper = new ProcessManagerPropertyMapper();
     _mapper.ConfigureMapping <IProcessManagerData, Message>(m => m.CorrelationId, pm => pm.CorrelationId);
 }