diff --git a/src/ZoneCodeGenerator/Parsing/CommandFile/Tests/TestAsset.cs b/src/ZoneCodeGenerator/Parsing/CommandFile/Tests/TestAsset.cs index bb6880dc..f35d67a4 100644 --- a/src/ZoneCodeGenerator/Parsing/CommandFile/Tests/TestAsset.cs +++ b/src/ZoneCodeGenerator/Parsing/CommandFile/Tests/TestAsset.cs @@ -33,18 +33,18 @@ namespace ZoneCodeGenerator.Parsing.CommandFile.Tests var assetType = state.Repository.GetDataTypeByName(assetTypeName); if (assetType == null) { - throw new LoadingException($"Could not find type '{assetTypeName}' to mark it as an asset."); + throw new TestFailedException($"Could not find type '{assetTypeName}' to mark it as an asset."); } if (!(assetType is DataTypeWithMembers assetTypeWithMembers)) { - throw new LoadingException($"Type of asset '{assetTypeName}' needs to be struct or union."); + throw new TestFailedException($"Type of asset '{assetTypeName}' needs to be struct or union."); } var assetInfo = state.Repository.GetInformationFor(assetTypeWithMembers); if (assetInfo == null) { - throw new LoadingException($"Could not find information for type '{assetTypeName}' to mark it as an asset."); + throw new TestFailedException($"Could not find information for type '{assetTypeName}' to mark it as an asset."); } var enumEntryName = NextMatch(AssetEnumEntryToken); @@ -52,7 +52,7 @@ namespace ZoneCodeGenerator.Parsing.CommandFile.Tests .SelectMany(_enum => _enum.Members) .FirstOrDefault(member => member.Name.Equals(enumEntryName, StringComparison.CurrentCultureIgnoreCase)); - assetInfo.AssetEnumEntry = enumEntry ?? throw new LoadingException( + assetInfo.AssetEnumEntry = enumEntry ?? throw new TestFailedException( $"Could not find enum entry '{enumEntryName}' as an asset type index for asset type '{assetTypeName}'."); } } diff --git a/src/ZoneCodeGenerator/Parsing/CommandFile/Tests/TestUse.cs b/src/ZoneCodeGenerator/Parsing/CommandFile/Tests/TestUse.cs index 8fab3a67..8752f894 100644 --- a/src/ZoneCodeGenerator/Parsing/CommandFile/Tests/TestUse.cs +++ b/src/ZoneCodeGenerator/Parsing/CommandFile/Tests/TestUse.cs @@ -27,12 +27,12 @@ namespace ZoneCodeGenerator.Parsing.CommandFile.Tests if (dataTypeToUse == null) { - throw new LoadingException($"Could not find data type '{typeName}'"); + throw new TestFailedException($"Could not find data type '{typeName}'"); } if (!(dataTypeToUse is DataTypeWithMembers dataTypeWithMembersToUse)) { - throw new LoadingException($"To use data type '{typeName}' it must either be a struct or a union."); + throw new TestFailedException($"To use data type '{typeName}' it must either be a struct or a union."); } state.DataTypeInUse = dataTypeWithMembersToUse;