ChessDotNet.Tests.UtilitiesTests.TestThrowIfNull C# (CSharp) Method

TestThrowIfNull() private method

private TestThrowIfNull ( ) : void
return void
        public static void TestThrowIfNull()
        {
            Assert.Throws<ArgumentNullException>(delegate ()
            {
                object value = null;
                ChessUtilities.ThrowIfNull(value, "value");
            });

            Assert.DoesNotThrow(delegate ()
            {
                Piece piece = new Bishop(Player.White);
                ChessUtilities.ThrowIfNull(piece, "piece");
            });
        }