Coder Social home page Coder Social logo

raysingernz / introtounittestingworkshop Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 516 KB

This repo contains the files used for the Intro to Unit Testing Workshop presented by John Wang and Ray Singer at CPP. This workshop is designed to get new students started with unit testing.

C# 100.00%

introtounittestingworkshop's Introduction

Intro to Unit Testing Workshop in Visual Studio

About

This repo contains the files used for the Intro to Unit Testing Workshop presented by John Wang and Ray Singer at CPP.

Goal of Workshop

To show what unit testing is, why it is so helpful and how you can use it in your own projects. Get you started with unit testing, and show how you can use unit testing to your advantage in CPP's VP1 project.

Goal of Files

The files are designed to show how testing can be implemented against the VP1 project's datalayer, to check for a sound SQL connection and that the data returned is correct.

Rather than making a standard database with orders or movies like we do in class, I decided to make it based around a gang. It contains gang members and their corresponding weapons. I was planning to go further in implementing this and make a more detailed system, which I may still do at some stage. For now it seems more important to get this workshop done to provide students with a start into unit testing.

How to Use This Project

If you have a GitHub account you can fork this repository, else you can download the ZIP file.

  1. Once you have a copy of this project, first restore the database.
  2. The database is a .bak file. If this file doesn't up, ensure your global git ignore doesn't include *.bak files.
  3. Open SQL Management Studio, expand the Database Engine, select the server inside, right click and connect to it.
  4. Right click on the Databases folder in the Object Explorer and select the Restore Database option.
  5. In the dialog box select the Device under Source, click the ellipsis, ensure Backup Media Type is selected as File and click on the Add button.
  6. Navigate to the BadassGangDB.bak file location and click OK to restore the database.
  7. Now you can load up the solution in Visual Studio.
  8. With the solution open, reveal the Server Explorer panel in VS (Visual Studio). Right click on Data Connections, hit Refresh. Right click again and select Add Connection.
  9. Under Server Name enter localhost, this should populate the Connect to a database combobox.
  10. Select BadassGangDB and hit OK.
  11. With the database connected you can now run the tests
  12. Navigate to Test > Run > All Tests.
  13. Alternatively if you wish to debug you tests by positioning breakpoints in them, select Test > Debug > All Tests.

introtounittestingworkshop's People

Contributors

raysingernz avatar nzjohnah avatar

Watchers

James Cloos avatar  avatar

Forkers

nzjohnah

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.