KoogleApp/Koogle.Tests/ReducerTests/ThrowPanelStateTests.cs

44 lines
1.1 KiB
C#

using KoogleApp.Components.Controls;
using KoogleApp.Games.Training;
using KoogleApp.Store.Game.ThrowPanel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FluentAssertions;
namespace Koogle.Tests.ReducerTests
{
public class ThrowPanelStateTests
{
[Fact]
public void StartStopAction_StartAGame()
{
// Arrange
var initialState = new ThrowPanelState();
var action = new StartStopAction(initialState, new TrainingSetupState());
// Act
var newState = ThrowPanelStateReducer.OnStartStop(initialState, action);
// Assert
newState.IsStated.Should().Be(true);
}
[Fact]
public void StartStopAction_StopAGame()
{
// Arrange
var initialState = new ThrowPanelState();
var action = new StartStopAction(initialState, null);
// Act
var newState = ThrowPanelStateReducer.OnStartStop(initialState, action);
// Assert
newState.IsStated.Should().Be(false);
}
}
}