Esempio n. 1
0
        public static EducationOrganizationTestDataBuilder Initialize(IDbConnection connection)
        {
            var builder = new EducationOrganizationTestDataBuilder {
                Connection = connection
            };

            using var command   = connection.CreateCommand();
            command.CommandText = "SELECT LocalEducationAgencyCategoryDescriptorId FROM edfi.LocalEducationAgencyCategoryDescriptor;";
            builder.TestLocalEducationAgencyCategoryDescriptorId = Convert.ToInt32(command.ExecuteScalar());

            command.CommandText = "SELECT ProviderStatusDescriptorId FROM edfi.ProviderStatusDescriptor;";
            builder.TestProviderStatusDescriptorId = Convert.ToInt32(command.ExecuteScalar());

            command.CommandText = "SELECT ProviderCategoryDescriptorId FROM edfi.ProviderCategoryDescriptor;";
            builder.TestProviderCategoryDescriptorId = Convert.ToInt32(command.ExecuteScalar());

            command.CommandText = "SELECT GradeLevelDescriptorId FROM edfi.GradeLevelDescriptor;";
            builder.TestGradeLevelDescriptorId = Convert.ToInt32(command.ExecuteScalar());

            command.CommandText = "SELECT EmploymentStatusDescriptorId FROM edfi.EmploymentStatusDescriptor;";
            builder.TestEmploymentStatusDescriptorId = Convert.ToInt32(command.ExecuteScalar());

            command.CommandText = "SELECT StaffClassificationDescriptorId FROM edfi.StaffClassificationDescriptor;";
            builder.TestStaffClassificationDescriptorId = Convert.ToInt32(command.ExecuteScalar());

            command.CommandText = "SELECT ResponsibilityDescriptorId FROM edfi.ResponsibilityDescriptor;";
            builder.TestResponsibilityDescriptorId = Convert.ToInt32(command.ExecuteScalar());

            return(builder);
        }
 public void Setup()
 {
     _transaction = new TransactionScope();
     Connection   = BuildTestConnection();
     Builder      = EducationOrganizationTestDataBuilder.Initialize(Connection);
 }