public void TestSimpleSequentialHttpPostRequests(int iterationCount)
{
Console.WriteLine("Operation start: TestSimpleSequentialHttpPostRequests\n");
var db = new ADatabase(Database.Alias);
//ServicePointManager.DefaultConnectionLimit = 40;
//ServicePointManager.Expect100Continue = false;
//ServicePointManager.UseNagleAlgorithm = false;
ExecuteTimedTest(iterationCount, () => {
var entity = new PerformanceEntity();
entity.Id = "1234567890123456789012345678901234";
entity.Key = "1234567";
entity.Revision = "1234567";
entity.Name = "Mohamad Abu Bakar";
entity.IcNumber = "1234567-12-3444";
entity.Department = "IT Department";
entity.Height = 1234;
entity.DateOfBirth = new DateTime(2015, 1, 27, 3, 33, 3);
entity.Salary = 3333;
var jsonEntity = JSON.ToJSON(entity);
var response = SimpleHttpPostCreateDocument(
"http://localhost:8529/_db/" + Database.TestDatabaseGeneral + "/_api/document?collection=" + Database.TestDocumentCollectionName,
jsonEntity
);
var deserializedResponse = JSON.ToObject<Dictionary<string, object>>(response);
});
Console.WriteLine("\nOperation end: TestSimpleSequentialHttpPostRequests");
}