mirror of
https://github.com/ysoftdevs/Theatrical-Players-Refactoring-Kata.git
synced 2026-04-27 03:09:37 +02:00
example tests updated
This commit is contained in:
@@ -2,15 +2,16 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using ApprovalTests;
|
||||
using ApprovalTests.Reporters;
|
||||
using Xunit;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace TheatricalPlayersRefactoringKata.Tests
|
||||
{
|
||||
[TestFixture]
|
||||
public class StatementPrinterTests
|
||||
{
|
||||
[Fact]
|
||||
[Test]
|
||||
[UseReporter(typeof(DiffReporter))]
|
||||
public void test_statement_example()
|
||||
public void test_statement_plain_text_example()
|
||||
{
|
||||
var plays = new Dictionary<string, Play>();
|
||||
plays.Add("hamlet", new Play("Hamlet", "tragedy"));
|
||||
@@ -23,10 +24,32 @@ namespace TheatricalPlayersRefactoringKata.Tests
|
||||
|
||||
StatementPrinter statementPrinter = new StatementPrinter();
|
||||
var result = statementPrinter.Print(invoice, plays);
|
||||
|
||||
|
||||
Approvals.Verify(result);
|
||||
}
|
||||
[Fact]
|
||||
|
||||
[Test]
|
||||
[UseReporter(typeof(DiffReporter))]
|
||||
public void test_statement_html_example()
|
||||
{
|
||||
var plays = new Dictionary<string, Play>();
|
||||
plays.Add("hamlet", new Play("Hamlet", "tragedy"));
|
||||
plays.Add("as-like", new Play("As You Like It", "comedy"));
|
||||
plays.Add("othello", new Play("Othello", "tragedy"));
|
||||
|
||||
Invoice invoice = new Invoice("BigCo", new List<Performance>{new Performance("hamlet", 55),
|
||||
new Performance("as-like", 35),
|
||||
new Performance("othello", 40)});
|
||||
|
||||
StatementPrinter statementPrinter = new StatementPrinter();
|
||||
|
||||
// Not implemented yet
|
||||
// var result = statementPrinter.PrintAsHtml(invoice, plays);
|
||||
// Approvals.Verify(result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[UseReporter(typeof(DiffReporter))]
|
||||
public void test_statement_with_new_play_types()
|
||||
{
|
||||
var plays = new Dictionary<string, Play>();
|
||||
|
||||
Reference in New Issue
Block a user