You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.4 KiB
47 lines
1.4 KiB
using MiniGames.Client.ViewModel;
|
|
using MiniGames.Shared.Models;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Xunit;
|
|
|
|
namespace MiniGamesTests
|
|
{
|
|
public class SchereSteinPapierEchseSpockTest
|
|
{
|
|
SchereSteinPapierEchseSpock Spiel = new();
|
|
SchereSteinPapierEchseSpockModel SpieleModel = new();
|
|
private const string stein = "Stein";
|
|
private const string schere = "Schere";
|
|
private const string papier = "Papier";
|
|
private const string echse = "Echse";
|
|
private const string spock = "Spock";
|
|
|
|
private const string gewonnen = "Gewonnen";
|
|
private const string verloren = "Verloren";
|
|
private const string unentschieden = "Unentschieden";
|
|
|
|
[Theory]
|
|
[InlineData(stein, stein, unentschieden)]
|
|
[InlineData(stein, schere, gewonnen)]
|
|
[InlineData(stein, papier, verloren)]
|
|
[InlineData(stein, echse, gewonnen)]
|
|
[InlineData(stein, spock, verloren)]
|
|
public void IsStone(string hand, string gegner, string erwartet)
|
|
{
|
|
//arrange
|
|
string spielerHand = hand;
|
|
string gegnerHand = gegner;
|
|
string erwartetesErg = erwartet;
|
|
|
|
//act
|
|
string getestetesErg = Spiel.SpielerStein(spielerHand, gegnerHand);
|
|
|
|
//assert
|
|
Assert.Equal(erwartetesErg, getestetesErg);
|
|
}
|
|
|
|
}
|
|
}
|