Class MazeWasmInteropTestBase
This base class contains the xUnit unit tests for the MazeWasmInterop class
Inheritance
Inherited Members
Namespace: Maze.Wasm.Interop.Tests
Assembly: Maze.Wasm.Interop.Tests.dll
Syntax
public abstract class MazeWasmInteropTestBase
Constructors
MazeWasmInteropTestBase()
Declaration
protected MazeWasmInteropTestBase()
Methods
GetInterop()
Returns the MazeWasmInterop instance to be used for the tests
Declaration
protected abstract MazeWasmInterop GetInterop()
Returns
| Type | Description |
|---|---|
| MazeWasmInterop | MazeWasmInterop instance |
MazeWasmClear_ShouldFailForInvalidEndCol()
Confirms that MazeWasmClearCells(uint, uint, uint, uint, uint) fails to clear cell content in a maze when provided with an invalid target end column
Declaration
[Fact]
public void MazeWasmClear_ShouldFailForInvalidEndCol()
MazeWasmClear_ShouldFailForInvalidEndRow()
Confirms that MazeWasmClearCells(uint, uint, uint, uint, uint) fails to clear cell content in a maze when provided with an invalid target end row
Declaration
[Fact]
public void MazeWasmClear_ShouldFailForInvalidEndRow()
MazeWasmClear_ShouldFailForInvalidStartCol()
Confirms that MazeWasmClearCells(uint, uint, uint, uint, uint) fails to clear cell content in a maze when provided with an invalid target start column
Declaration
[Fact]
public void MazeWasmClear_ShouldFailForInvalidStartCol()
MazeWasmClear_ShouldFailForInvalidStartRow()
Confirms that MazeWasmClearCells(uint, uint, uint, uint, uint) fails to clear cell content in a maze when provided with an invalid target start row
Declaration
[Fact]
public void MazeWasmClear_ShouldFailForInvalidStartRow()
MazeWasmClear_ShouldSucceed()
Confirms that MazeWasmClearCells(uint, uint, uint, uint, uint) clears cell content in a maze when provided with a valid target cell range
Declaration
[Fact]
public void MazeWasmClear_ShouldSucceed()
MazeWasmDeleteCols_FailsForEmptyMaze()
Confirms that MazeWasmDeleteCols(uint, uint, uint) fails for an empty maze
Declaration
[Fact]
public void MazeWasmDeleteCols_FailsForEmptyMaze()
MazeWasmDeleteCols_FailsForInvalidStartCol()
Confirms that MazeWasmDeleteCols(uint, uint, uint) fails for an invalid start column
Declaration
[Fact]
public void MazeWasmDeleteCols_FailsForInvalidStartCol()
MazeWasmDeleteCols_FailsIfCountTooLarge()
Confirms that MazeWasmDeleteCols(uint, uint, uint) fails if the number of columns requested is too large
Declaration
[Fact]
public void MazeWasmDeleteCols_FailsIfCountTooLarge()
MazeWasmDeleteCols_SucceedsForValidStartCol()
Confirms that MazeWasmDeleteCols(uint, uint, uint) succeeds for a valid start column and column count
Declaration
[Fact]
public void MazeWasmDeleteCols_SucceedsForValidStartCol()
MazeWasmDeleteRows_FailsForEmptyMaze()
Confirms that MazeWasmDeleteRows(uint, uint, uint) fails for an empty maze
Declaration
[Fact]
public void MazeWasmDeleteRows_FailsForEmptyMaze()
MazeWasmDeleteRows_FailsForInvalidStartRow()
Confirms that MazeWasmDeleteRows(uint, uint, uint) fails for an invalid start row
Declaration
[Fact]
public void MazeWasmDeleteRows_FailsForInvalidStartRow()
MazeWasmDeleteRows_FailsIfCountTooLarge()
Confirms that MazeWasmDeleteRows(uint, uint, uint) fails if the number of rows requested is too large
Declaration
[Fact]
public void MazeWasmDeleteRows_FailsIfCountTooLarge()
MazeWasmDeleteRows_SucceedsForValidStartRow()
Confirms that MazeWasmDeleteRows(uint, uint, uint) succeeds for a valid start row and row count
Declaration
[Fact]
public void MazeWasmDeleteRows_SucceedsForValidStartRow()
MazeWasmFromJson_ShouldFail()
Confirms that MazeWasmFromJson(uint, string) fails when presented with invalid JSON
Declaration
[Fact]
public void MazeWasmFromJson_ShouldFail()
MazeWasmFromJson_ShouldSucceed()
Confirms that MazeWasmFromJson(uint, string) succeeds when presented with valid JSON
Declaration
[Fact]
public void MazeWasmFromJson_ShouldSucceed()
MazeWasmGetCellType_FailsForEmptyMaze()
Confirms that MazeWasmGetCellType(uint, uint, uint) fails for an empty maze
Declaration
[Fact]
public void MazeWasmGetCellType_FailsForEmptyMaze()
MazeWasmGetCellType_FailsForInvalidCol()
Confirms that MazeWasmGetCellType(uint, uint, uint) fails for an invalid target column
Declaration
[Fact]
public void MazeWasmGetCellType_FailsForInvalidCol()
MazeWasmGetCellType_FailsForInvalidRow()
Confirms that MazeWasmGetCellType(uint, uint, uint) fails for an invalid target row
Declaration
[Fact]
public void MazeWasmGetCellType_FailsForInvalidRow()
MazeWasmGetCellType_SucceedsForValidCellLocation()
Confirms that MazeWasmGetCellType(uint, uint, uint) succeeds for a valid cell location
Declaration
[Fact]
public void MazeWasmGetCellType_SucceedsForValidCellLocation()
MazeWasmGetColCount_ShouldReturnCorrectNumberCols()
Confirms that MazeWasmGetColCount(uint) returns the expected number of columns for a maze that has size
Declaration
[Fact]
public void MazeWasmGetColCount_ShouldReturnCorrectNumberCols()
MazeWasmGetFinishCell_FailsForEmptyMaze()
Confirms that MazeWasmGetFinishCell(uint) fails for an empty maze
Declaration
[Fact]
public void MazeWasmGetFinishCell_FailsForEmptyMaze()
MazeWasmGetFinishCell_FailsIfNotDefined()
Confirms that MazeWasmGetFinishCell(uint) fails if a finish cell is not defined
Declaration
[Fact]
public void MazeWasmGetFinishCell_FailsIfNotDefined()
MazeWasmGetFinishCell_SucceedsIfDefined()
Confirms that MazeWasmGetFinishCell(uint) succeeds if a finish cell is defined
Declaration
[Fact]
public void MazeWasmGetFinishCell_SucceedsIfDefined()
MazeWasmGetNumObjectsAllocated_ShouldSucceedAndBeNonZero()
Confirms that GetNumObjectsAllocated() succeeds and returns the expected object count when objects are not freed
Declaration
[Fact]
public void MazeWasmGetNumObjectsAllocated_ShouldSucceedAndBeNonZero()
MazeWasmGetRowCount_ShouldReturnCorrectNumberRows()
Confirms that MazeWasmGetRowCount(uint) returns the expected number of rows for a maze that has size
Declaration
[Fact]
public void MazeWasmGetRowCount_ShouldReturnCorrectNumberRows()
MazeWasmGetSizedMemoryUsed_ShouldBeNonZeroAfterAllocate()
Confirms that GetSizedMemoryUsed() succeeds and returns the expected non-zero value when memory is not released
Declaration
[Fact]
public void MazeWasmGetSizedMemoryUsed_ShouldBeNonZeroAfterAllocate()
MazeWasmGetSizedMemoryUsed_ShouldBeZeroAfterAllocateAndFree()
Confirms that GetSizedMemoryUsed() succeeds and returns zero after allocating and then freeing sized memory
Declaration
[Fact]
public void MazeWasmGetSizedMemoryUsed_ShouldBeZeroAfterAllocateAndFree()
MazeWasmGetSizedMemoryUsed_ShouldSucceedAndBeZero()
Confirms that GetSizedMemoryUsed() succeeds and returns zero when expected
Declaration
[Fact]
public void MazeWasmGetSizedMemoryUsed_ShouldSucceedAndBeZero()
MazeWasmGetStartCell_FailsForEmptyMaze()
Confirms that MazeWasmGetStartCell(uint) fails for an empty maze
Declaration
[Fact]
public void MazeWasmGetStartCell_FailsForEmptyMaze()
MazeWasmGetStartCell_FailsIfNotDefined()
Confirms that MazeWasmGetStartCell(uint) fails if a start cell is not defined
Declaration
[Fact]
public void MazeWasmGetStartCell_FailsIfNotDefined()
MazeWasmGetStartCell_SucceedsIfDefined()
Confirms that MazeWasmGetStartCell(uint) succeeds if a start cell is defined
Declaration
[Fact]
public void MazeWasmGetStartCell_SucceedsIfDefined()
MazeWasmInsertCols_FailsForEmptyMaze()
Confirms that MazeWasmInsertCols(uint, uint, uint) fails for an empty maze
Declaration
[Fact]
public void MazeWasmInsertCols_FailsForEmptyMaze()
MazeWasmInsertCols_FailsForInvalidStartCol()
Confirms that MazeWasmInsertCols(uint, uint, uint) fails for an invalid start column
Declaration
[Fact]
public void MazeWasmInsertCols_FailsForInvalidStartCol()
MazeWasmInsertCols_SucceedsForValidStartCol()
Confirms that MazeWasmInsertCols(uint, uint, uint) succeeds for a valid start column and column count
Declaration
[Fact]
public void MazeWasmInsertCols_SucceedsForValidStartCol()
MazeWasmInsertRows_FailsForInvalidStartRow()
Confirms that MazeWasmInsertRows(uint, uint, uint) fails for an invalid start row
Declaration
[Fact]
public void MazeWasmInsertRows_FailsForInvalidStartRow()
MazeWasmInsertRows_SucceedsForValidStartRow()
Confirms that MazeWasmInsertRows(uint, uint, uint) succeeds for a valid start row
Declaration
[Fact]
public void MazeWasmInsertRows_SucceedsForValidStartRow()
MazeWasmIsEmpty_ShouldReturnFalseForMazeWithSize()
Confirms that MazeWasmIsEmpty(uint) returns false for a maze that has size
Declaration
[Fact]
public void MazeWasmIsEmpty_ShouldReturnFalseForMazeWithSize()
MazeWasmIsEmpty_ShouldReturnTrueForNewMaze()
Confirms that MazeWasmIsEmpty(uint) returns true for a newly created maze
Declaration
[Fact]
public void MazeWasmIsEmpty_ShouldReturnTrueForNewMaze()
MazeWasmReset_ShouldSucceed()
Confirms that MazeWasmReset(uint) removes all rows and columns in a maze
Declaration
[Fact]
public void MazeWasmReset_ShouldSucceed()
MazeWasmResize_ChangesRowAndColumnCounts()
Confirms that MazeWasmResize(uint, uint, uint) correctly resizes a maze to the expected row and column counts
Declaration
[Fact]
public void MazeWasmResize_ChangesRowAndColumnCounts()
MazeWasmSetFinishCell_FailsForInvalidCol()
Confirms that MazeWasmSetFinishCell(uint, uint, uint) fails for an invalid target column
Declaration
[Fact]
public void MazeWasmSetFinishCell_FailsForInvalidCol()
MazeWasmSetFinishCell_FailsForInvalidRow()
Confirms that MazeWasmSetFinishCell(uint, uint, uint) fails for an invalid target row
Declaration
[Fact]
public void MazeWasmSetFinishCell_FailsForInvalidRow()
MazeWasmSetStartCell_FailsForInvalidCol()
Confirms that MazeWasmSetStartCell(uint, uint, uint) fails for an invalid target column
Declaration
[Fact]
public void MazeWasmSetStartCell_FailsForInvalidCol()
MazeWasmSetStartCell_FailsForInvalidRow()
Confirms that MazeWasmSetStartCell(uint, uint, uint) fails for an invalid target row
Declaration
[Fact]
public void MazeWasmSetStartCell_FailsForInvalidRow()
MazeWasmSetWallCells_FailsForEmptyMaze()
Confirms that MazeWasmSetWallCells(uint, uint, uint, uint, uint) fails for an empty maze
Declaration
[Fact]
public void MazeWasmSetWallCells_FailsForEmptyMaze()
MazeWasmSetWallCells_FailsForInvalidEndLocation()
Confirms that MazeWasmSetWallCells(uint, uint, uint, uint, uint) fails for an invalid end location
Declaration
[Fact]
public void MazeWasmSetWallCells_FailsForInvalidEndLocation()
MazeWasmSetWallCells_FailsForInvalidStartLocation()
Confirms that MazeWasmSetWallCells(uint, uint, uint, uint, uint) fails for an invalid start location
Declaration
[Fact]
public void MazeWasmSetWallCells_FailsForInvalidStartLocation()
MazeWasmSetWallCells_SucceedsForValidCellRange()
Confirms that MazeWasmSetWallCells(uint, uint, uint, uint, uint) succeeds for a valid cell range
Declaration
[Fact]
public void MazeWasmSetWallCells_SucceedsForValidCellRange()
MazeWasmSolutionGetPathPoints_ShouldSucceed()
Confirms that MazeWasmSolutionGetPathPoints(uint) succeeds when provided with a valid solution and produces the expected path
Declaration
[Fact]
public void MazeWasmSolutionGetPathPoints_ShouldSucceed()
MazeWasmSolve_ShouldFailWithNoFinishCell()
Confirms that MazeWasmSolve(uint) fails if a maze does not contain a finish cell and returns an error indicating that it is missing
Declaration
[Fact]
public void MazeWasmSolve_ShouldFailWithNoFinishCell()
MazeWasmSolve_ShouldFailWithNoStartCell()
Confirms that MazeWasmSolve(uint) fails if a maze does not contain a start cell and returns an error indicating that it is missing
Declaration
[Fact]
public void MazeWasmSolve_ShouldFailWithNoStartCell()
MazeWasmSolve_ShouldSucceed()
Confirms that MazeWasmSolve(uint) succeeds for a valid maze
Declaration
[Fact]
public void MazeWasmSolve_ShouldSucceed()
MazeWasmToJson_ShouldSucceed()
Confirms that MazeWasmToJson(uint) succeeds and produces the expected output
Declaration
[Fact]
public void MazeWasmToJson_ShouldSucceed()
NewMazeWasm_ReturnsNonZeroPointer()
Confirms that NewMazeWasm() returns a non-zero pointer value
Declaration
[Fact]
public void NewMazeWasm_ReturnsNonZeroPointer()