Ejemplo n.º 1
0
        static void HandleOptions(string command)
        {
            TestNorthWind testNorthWind = new TestNorthWind();

            switch (command.ToUpper())
            {
            case "Q":
                testNorthWind.GetCustomerOrderDetialsTest();
                break;

            case "I":
                testNorthWind.InsertEmployeeTest();
                break;

            case "G":
                TestDocuments.GetDocument();
                break;

            case "A":
                TestDocuments.InsertDocument();
                break;

            default:
                break;
            }
        }
        /// <summary>
        /// Scans the Test Document Library for the documents contained in this ScenarioContract.
        /// </summary>
        public void ScanTestDocuments()
        {
            List <string> databaseFiles = null;

            using (DocumentLibraryContext context = DbConnect.DocumentLibraryContext())
            {
                databaseFiles = context.TestDocuments.Select(x => x.TestDocumentExtension.Location + @"\" + x.FileName).ToList();
            }

            var missingDocuments = TestDocuments.Where(x => !databaseFiles.Any(y => x.Original.Equals(y))).Distinct();

            foreach (var document in missingDocuments)
            {
                document.ResolutionRequired = true;
            }
        }
Ejemplo n.º 3
0
        private static async Task ResetDatabase()
        {
            await DocumentServer.DropDatabase(_workContext, _dbName);

            await TestDocuments.RunAsync(async x => await Collection.Insert(_workContext, x));
        }