This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$db_password="P@ssw0rd" | |
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=$db_password" ` | |
-p 1433:1433 -d --name mssql` | |
mcr.microsoft.com/mssql/server:2017-CU8-ubuntu | |
docker exec -it mssql /opt/mssql-tools/bin/sqlcmd ` | |
-S localhost -U sa -P $db_password ` | |
-Q "IF NOT EXISTS (SELECT * FROM sys.databases WHERE name = N'Radio') BEGIN CREATE DATABASE [Radio] END;" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Env:BROWSER="none" | |
$Env:RADIO_CONNECTION_STRING="Server=<sever-name>; Database=Radio; Integrated Security=False; User Id=sa; Password=P@ssw0rd;" | |
$Env:RADIO_HOST_API="http://localhost:5000" | |
$Env:RADIO_HOST_UI="http://localhost:3000" | |
$Env:CYPRESS_RADIO_HOST_UI=$Env:RADIO_HOST_UI | |
$Env:CYPRESS_RADIO_HOST_API=$Env:RADIO_HOST_API | |
$Env:REACT_APP_RADIO_API_BASE_URL=$Env:RADIO_HOST_API |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Fact] | |
public void send_custom_greeting_by_email() | |
{ | |
var sut = new GreetingService(); | |
var emailGateway = new Mock<IEmailGateway>(); | |
sut.SendMail(emailGateway.Object, "Joe", "[email protected]"); | |
emailGateway.Verify(es => | |
es.Send("[email protected]", "Hello, Joe!")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Fact] | |
public void build_custom_greeting_with_name_and_language() | |
{ | |
var translationGateway = new Mock<ITranslationGateway>(); | |
GreetingService sut = new GreetingService(translationGateway.Object); | |
translationGateway.Setup(tg => tg.Translate("spanish")).Returns("Hola"); | |
var result = sut.Build("Joe", "spanish"); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import HTTP from "../utils/http" | |
import { h, app } from "hyperapp" | |
import * as DOM from "../utils/dom" | |
const createState = function () { | |
return { | |
message: "", | |
valid: false | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { test, suite, beforeEach, afterEach } = require( "mocha" ) | |
const { assertTextAs, initializeWebDriver } = require( "./utils" ) | |
suite( "home page", function () { | |
beforeEach( function () { | |
this.driver = initializeWebDriver() | |
return this.driver | |
.url( "http://localhost:8080/" ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using ACME.Api.Domain; | |
using Newtonsoft.Json; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
namespace ACME.Api.Infrastructure | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FakeRemoteBowlingService : IRemoteBowlingService | |
{ | |
public FakeRemoteBowlingService() | |
{ | |
} | |
public List<RemotePlayerData> Fetch(string code) | |
{ | |
var player1 = new RemotePlayerData() { Name = "joe", Rolls = "11111111111111111111" }; | |
var players = new List<RemotePlayerData>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace ACME.Api.Controllers | |
{ | |
[Route("api/games")] | |
public class BowlingServiceController : Controller | |
{ | |
[HttpGet("{code}")] | |
public IActionResult GetByCode(string code) | |
{ | |
var fakeRemoteBowlingService = new FakeRemoteBowlingService(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const WebDriver = require( "webdriverio" ) | |
describe( "getting game in UI", function () { | |
let driver | |
beforeEach( function () { | |
driver = WebDriver.remote( { | |
browserName: "chrome", | |
path: "/", |