Add TpkTests

This commit is contained in:
ds5678 2025-02-24 17:05:40 -08:00
parent a73aeb39e1
commit 8ed547204c
2 changed files with 34 additions and 9 deletions

View File

@ -0,0 +1,25 @@
using AssetRipper.SourceGenerated;
using AssetRipper.Tpk;
using AssetRipper.Tpk.EngineAssets;
using AssetRipper.Tpk.TypeTrees;
namespace AssetRipper.Tests;
internal class TpkTests
{
[Test]
public void EngineAssetsTpkSuccessfullyExtracts()
{
TpkFile tpk = TpkFile.FromStream(EngineAssetsTpk.GetStream());
TpkEngineAssetsBlob blob = (TpkEngineAssetsBlob)tpk.GetDataBlob();
Assert.That(blob.Data, Is.Not.Empty);
}
[Test]
public void TypeTreeTpkSuccessfullyExtracts()
{
TpkFile tpk = TpkFile.FromStream(SourceTpk.GetStream());
TpkTypeTreeBlob blob = (TpkTypeTreeBlob)tpk.GetDataBlob();
Assert.That(blob.ClassInformation, Is.Not.Empty);
}
}