brownbags.TDD Sample

User Story

As a journey service, i should list all journeys

  • Given there is no journey then return information about non existence
  • Given there exists any journeys then return them

Tech

  • .NET 5.0 - .NET is a free, cross-platform, open-source developer platform for building many different types of applications
  • xunit - Free, open source, community-focused unit testing tool for the .NET Framework
  • moq - The most popular and friendly mocking library for .NET
  • FluentAssertions - A very extensive set of extension methods that allow you to more naturally specify the expected outcome of a TDD or BDD-style unit tests
  • Docker - We help developers and development teams build and ship apps
  • Resharper - The Visual Studio Extension for .NET Developers

Installation

  • .NET 5.0 Download
  • Any IDE
  • Any SQL Server Database

Optional Installation

  • Resharper (Fast Refactoring) Download
  • Visual Studio Code Download
  • Local SQL Server Database Docker:
$ docker pull backendeveloper/local-mssql-server-db

Listing images and check Docker DB:

$ docker images

Running docker image:

$ docker run sql-server-db -d

Running docker check:

$ docker ps

Create Database:

$ docker exec -it sql-server-db "bash"
$ /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P super_duper_password
1> create database dbo
2> go

Check Database:

1> select name from sys.Databases
2> go

Create Table:

1> use dbo
2> go
1> create table journey (id INT)
2> go

and then running local DB!


License MIT