spooky-oysters / Bangazon-Command-Line-Application

0 stars 1 forks source link

CustomerManager is now connected to the database! #16

Closed krysmathis closed 6 years ago

krysmathis commented 6 years ago

Link to Ticket

1 User Should Be Able To Create Customer Account

Description of Proposed Changes

Steps to Test

Update Environment Variable

We will use two database files, one for development and one for testing. We need environment variables to store the path to both.

code ~/.zshrc
  1. Add or update environment variable for database to: "BANGAZON_CLI_APP_DB" (it may be BANGAZON_CLI_APP_DB.db)
  2. For the path: You'll want the database file to live in the root folder
  3. Add an additional Environment Variable for: "BANGAZON_CLI_APP_DB_TEST"
  4. Path should include "bangazon-cli-test.db"

In zshrc environment variables are in quotes - no need for semi colons at the end Be sure your environment variable is set before running test

Example:

export BANGAZON_CLI_APP_DB="/Users/krystopher/workspace/Bangazon-Command-Line-Application/bangazon-cli.db"
export BANGAZON_CLI_APP_DB_TEST="/Users/krystopher/workspace/Bangazon-Command-Line-Application/bangazon-cli-test.db"

When you've updated the file

source ~/.zshrc

Pull the branch down and run tests

git fetch --all
git checkout km-customer-manager-db
# navigate to the test project
cd bangazon-cli.Tests
dotnet restore
dotnet test

Impacted Areas in Application

List general components of the application that this PR will affect: For tests, when you create a customer you must provide all of the customer properties except Id. Any where you instantiate the CustomerManager you'll need to pass in a DatabaseInterface object

Mentions @username

Tag users that need to review this code

Definition of Done

  1. The project must be fully documented. This includes the following:
    1. Complete README that documents the steps to install the code, how to install any dependencies, or system configuration needed.
    2. Every class must be documented with purpose, author, and methods.
    3. Every method must be documented with purpose and argument list - which itself must contain a short purpose for each argument.
  2. The project must be able to run fully, and without errors, on each teammate's system.
  3. Fulfills every requirement. Every line of code has been peer reviewed.
  4. For projects that require unit testing, core functionality must be identified and have at least one test for each.
Chewieez commented 6 years ago

👍

DreRandaci commented 6 years ago

👍

kimberly-bird commented 6 years ago

👍