public void TestValueEquality2() { var refthing = new ReferenceTypeTestThing(5); var chunk1 = new GridChunk <ReferenceTypeTestThing>(); var chunk2 = new GridChunk <ReferenceTypeTestThing>(); chunk1[12, 4] = refthing; chunk2[12, 4] = refthing; Assert.AreEqual(chunk1, chunk2, "The chunks should be equal."); }
public void TestClearReferenceType() { var chunk = new GridChunk <ReferenceTypeTestThing>(); for (int x = 1; x < GridChunk <int> .ChunkSize; x++) { for (int y = 1; y < GridChunk <int> .ChunkSize; y++) { chunk[x - 1, y - 1] = new ReferenceTypeTestThing(1); } } chunk.Clear(); foreach (var value in chunk) { Assert.AreEqual(null, value); } }