public void Choose_Valid_Move() { var move = new Paper(); PlayerTestFactory.Create("Player 1", CallbackActionsTestFactory.Create(() => move)) .DoMove() .Should().Be(move); }
public void Call_Choose_Move() { var executed = false; PlayerTestFactory.Create("Player 1", CallbackActionsTestFactory.Create(() => { executed = true; return(new Paper()); })).DoMove(); executed.Should().BeTrue(); }
public static Player Create(string name) => new Player(name, CallbackActionsTestFactory.Create(() => new Paper()));
public void Name_Not_Allow_Null(string name) { Action act = () => new Player(name, CallbackActionsTestFactory.Create()); act.Should().Throw <ArgumentException>(); }