Grad.Codebook.Testing 2.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Grad.Codebook.Testing --version 2.0.0
                    
NuGet\Install-Package Grad.Codebook.Testing -Version 2.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Grad.Codebook.Testing" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Grad.Codebook.Testing" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Grad.Codebook.Testing" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Grad.Codebook.Testing --version 2.0.0
                    
#r "nuget: Grad.Codebook.Testing, 2.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Grad.Codebook.Testing@2.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Grad.Codebook.Testing&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Grad.Codebook.Testing&version=2.0.0
                    
Install as a Cake Tool

Grad.Codebook.Testing

Testing utilities for Grad Codebook. This package allows projects that depend on Codebook to test functionality that requires database access.

Purpose

The Grad.Codebook package exposes data through database views that query from the EDW (Enterprise Data Warehouse). For testing purposes, projects need a way to set up a test database without depending on the EDW. This package provides that capability by creating tables instead of views and populating them with representative test data.

Usage

using Grad.Codebook.Testing;

// Create an instance with your test database connection string
var testDb = new CodebookTestDatabase(connectionString);

// Set up the database (creates tables and inserts test data)
testDb.Setup();

// Or use async version
await testDb.SetupAsync();

What it Does

The CodebookTestDatabase class:

  1. Creates the Codebook database if it doesn't exist
  2. Drops existing tables if they exist (to ensure a clean state)
  3. Creates tables that match the structure of the Codebook views:
    • colleges
    • departments
    • concentrations
    • curriculums
    • degrees
    • subcolleges
    • subjects
    • grad_programs
    • minors
    • majors
    • joint_programs
    • major_concentrations
    • program_concentrations
    • department_names
    • program_names
  4. Inserts test data with representative examples of each entity type

Test Data

The package includes sample data for:

  • 3 colleges (Engineering, Liberal Arts & Sciences, Graduate College)
  • 3 departments (Computer Science, Mathematics, ECE)
  • 4 graduate programs (CS MS, CS PhD, Math MS, Math PhD)
  • 2 minors (CS, Math)
  • 2 majors (CS, Math)
  • 2 concentrations (AI, Database Systems)
  • And corresponding relationships between these entities

Notes

While it's not ideal for dependent projects to use the database directly, this approach is necessary for scenarios involving complex joins that aren't feasible with API calls.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.1.1 87 2/19/2026
2.1.0 119 2/19/2026
2.0.3 121 1/31/2026
2.0.2 207 1/30/2026
2.0.0 94 1/30/2026