Ejemplo n.º 1
0
 public SQLRecordAdder(string connectionString, int numRecordsToAdd)
 {
     this.ConnectionString = connectionString;
     this.NumRecordsToAdd  = numRecordsToAdd;
     this.recordGenerator  = new RandomRecordGenerator();
     this.commandGenerator = new SqlCommandGenerator();
 }
Ejemplo n.º 2
0
        public void GenerateRecords_ReturnsListOfRecords()
        {
            var sut        = new RandomRecordGenerator();
            int numRecords = 1000;
            var result     = sut.GenerateRandomRecords(numRecords);

            Assert.IsTrue(result.Count == numRecords);
        }
 public DocumentDBRecordAdder(string endpointUri, string primaryKey, string databaseName, int numRecordsToAdd)
 {
     this.EndpointUri     = endpointUri;
     this.PrimaryKey      = primaryKey;
     this.DatabaseName    = databaseName;
     this.client          = new DocumentClient(new Uri(this.EndpointUri), this.PrimaryKey);
     this.recordGenerator = new RandomRecordGenerator();
     this.NumRecordsToAdd = numRecordsToAdd;
 }
Ejemplo n.º 4
0
        public void GenerateRecord()
        {
            var sut    = new RandomRecordGenerator();
            var result = sut.GenerateRandomRecord();

            Assert.IsNotNull(result);
            Assert.IsFalse(string.IsNullOrEmpty(result.CustomerName));
            Assert.IsInstanceOfType(result.AccountId, typeof(Guid));
        }