public void ReadEmptyFile() { var r = new BspReader(EMPTY_FILE_FILENAME); r.ReadInfo(); r.Dispose(); }
public void ReadInfoDisposed() { var reader = new BspReader(MAP_FILENAME); reader.Dispose(); reader.ReadInfo(); }
public void ReadInvalidHeader() { var r = new BspReader(NOT_BSP_FILE_FILENAME); r.ReadInfo(); r.Dispose(); }
public void ReadInvalidStream() { var r = new BspReader(new MemoryStream()); r.ReadInfo(); r.Dispose(); }
public void OneNullComparison() { var r = new BspReader(MAP_FILENAME); var info1 = r.ReadInfo(); r.Dispose(); Assert.AreNotEqual(info1, null); }
public void ReadInfo() { var r = new BspReader(MAP_FILENAME); var info = r.ReadInfo(); r.Dispose(); Assert.IsInstanceOfType(info, typeof(BspInfo)); Assert.IsNotNull(info); }
public void WriteAndValidateBspInfo() { WriteBspInfo(); var reader = new BspReader(TEMP_FILENAME); var tempInfo = reader.ReadInfo(); reader.Dispose(); Assert.AreEqual(tempInfo, exampleInfo); }
public void ComparisonTest() { var r = new BspReader(MAP_FILENAME); var info1 = r.ReadInfo(); r.Dispose(); r = new BspReader(MAP_FILENAME); var info2 = r.ReadInfo(); r.Dispose(); Assert.AreEqual(info1, info2); }
public void ReadInfoDisposedMessage() { var reader = new BspReader(MAP_FILENAME); reader.Dispose(); try { reader.ReadInfo(); Assert.Fail(); } catch (Exception ex) { Assert.AreEqual(ex.Message, exceptionMessage); } }
public void ReadInCustomOrder() { var reader = new BspReader(MAP_FILENAME); var reference = reader.ReadInfo(); reader.Dispose(); reader = new BspReader(MAP_FILENAME); var meaninglessVar = reader.ReadLumpInfo(BspLumpType.LUMP_PAKFILE); var tested = reader.ReadInfo(); reader.Dispose(); Assert.AreEqual(reference, tested); }