Skip to content

Epicodus: C# and .NET, Week 1: Test-Driven Development with C#

License

Notifications You must be signed in to change notification settings

chloeloveall/PierresBakery.Solution

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to Pierre's Bakery

Pierre's Bakery

A console application that allows a user to place an order for bread and/or pastries

By Chloe Loveall


license   top project language   last github commit   github pull requests   open issues   github contributors

Table of Contents

  1. Table of Contents
  2. Description
  3. Technologies Used
  4. Setup and Installation Requirements
  5. Specifications
  6. Known Bugs
  7. Contributing
  8. License
  9. Acknowledgements
  10. Contact Information

Description

A basic console application for the first week of the Epicodus C# and .NET program. When the program is run, the user receives a welcome message, a menu with prices, and a prompt to begin their order with a bread quantity input. Next, the user receives a subtotal and a prompt to add a pastry quantity. The user then receives a grand total, a thank you message, and some ASCII art!

Technologies Used

  • C#
  • MSTest
  • .NET 5.0

Setup and Installation Requirements

Prior to Installation

  • Confirm you have installed .NET installed - this will provide access to the C# language
  • Additionally, you may want to install a REPL to allow you to practice, test, and experiment with C#. Below are instructions for the dotnet script REPL:
    • Install dotnet script by running the following terminal command: $ dotnet tool install -g dotnet-script
    • NOTE: If you just installed .NET 5, restart the terminal. (Otherwise, you will not be able to run the following command.)
      • Enter $ dotnet script in your terminal and a prompt will open: >
      • To exit the REPL press: Ctrl +C

Installation

  • Clone the repository with the following git terminal command: $ git clone https://github.com/chloeloveall/PierresBakery.Solution.git
  • Open the project directory in your terminal
  • Navigate to the PierresBakery.Tests directory
    • To create obj directories in both production and test projects, run the terminal command: $ dotnet restore
    • NOTE: Do not touch the code in either obj directory.
  • To launch the program, run the terminal command: dotnet run

Unit Testing with MSTest

  • Navigate to the PierresBakery.Tests directory
  • Run the terminal command: $ dotnet test
  • If everything is set up correctly, you will see something similar to this: MSTest Screenshot

Specifications

Behavior Input Output
User will receive a welcome message when they run the program user runs the program Welcome to Pierre's Bakery!
User will receive a message with the cost of Bread user runs the program Bread: Buy 2, get 1 free. A single loaf costs $5.
User will receive a message with the cost of Pastry user runs the program Pastry: Buy 1 for $2 or 3 for $5.
User receives an order prompt for Bread user runs the program How many loaves of bread would you like?
Program will add cost of bread to order price total 1 $5
User receives an order prompt for Pastry user bread order input How many pastries would you like to add to your order?
Program will add pastries to order price total 1 $2
Program will start order over if invalid input is received Q "This is not a valid input! Now you have to start over!" / Program starts again from Main()

Known Bugs

  • None at this time

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the project on GirHub
  2. Create your Feature Branch: $ git checkout -b YourFeatureBranchName
  3. Commit your Changes $ git commit -m 'Add some Amazing Feature'
  4. Push to your feature branch on Github $ git push origin YourFeatureBranchName
  5. Open a Pull Request

License

MIT

Acknowledgements

Contact Information

Chloe Loveall chloeloveall@protonmail.com

github followers   github forks   github stars

Back to Top

About

Epicodus: C# and .NET, Week 1: Test-Driven Development with C#

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages