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
[Test] | |
public void WhenUserPlacesACorrectOrderWithMoreThenOneItemThenAnOrderNumberShouldBeReturned() | |
{ | |
//Arrange | |
var shoppingCart = new ShoppingCart(); | |
var itemOneId = Guid.NewGuid(); | |
var itemTwoId = Guid.NewGuid(); | |
int itemOneQuantity = 1; | |
int itemTwoQuantity = 4; | |
shoppingCart.Items.Add(new ShoppingCartItem { ItemId = itemOneId, Quantity = itemOneQuantity }); |
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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace StaticallyBoundLibrary | |
{ | |
public class BusinessService | |
{ |
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 wait = ( | |
time, | |
cancel = Promise.reject() | |
) => new Promise((resolve, reject) => { | |
const timer = setTimeout(resolve, time); | |
cancel.then(() => { | |
clearTimeout(timer); | |
reject(new Error('Cancelled')); | |
}); |
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 System; | |
using GameNetworkInterfaces; | |
using Moq; | |
using NUnit.Framework; | |
using TicTacToe.Core; | |
namespace TicTacToe.Tests | |
{ | |
[TestFixture] | |
class GameEngineTests |
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 GameNetworkInterfaces; | |
using System; | |
namespace TicTacToe.Core | |
{ | |
public class GameEngine | |
{ | |
private ICommonGameNetworkControl _gameNetworkControl; | |
public GameEngine(ICommonGameNetworkControl gameNetworkControl) |
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 System; | |
using GameNetworkInterfaces; | |
using Moq; | |
using NUnit.Framework; | |
using TicTacToe.Core; | |
namespace TicTacToe.UnitTests | |
{ | |
[TestFixture] | |
class GameEngineTests |
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 System; | |
using GameNetworkInterfaces; | |
namespace TicTacToe.Core | |
{ | |
public class GameEngine | |
{ | |
private ICommonGameNetworkControl _network; | |
public GameEngine(ICommonGameNetworkControl network) |
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 System; | |
using TicTacToe.Core.ExternalSystem; | |
namespace TicTacToe.Core | |
{ | |
public class GameEngine | |
{ | |
private ICommonGameNetworkControl _networkInterface; | |
public GameEngine(ICommonGameNetworkControl networkInterface) |
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 System; | |
using Moq; | |
using NUnit.Framework; | |
using TicTacToe.Core; | |
using TicTacToe.Core.ExternalSystem; | |
namespace TicTacToe.Tests | |
{ | |
[TestFixture] | |
public class TicTacToeGameEngineTests |
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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using TicTacToe.Core.GameNetworkInterfaces; | |
namespace TicTacToe.Core | |
{ | |
public class GameEngine |
NewerOlder