From c3f10eee3ec806c364d4b5afb285c890e295d10b Mon Sep 17 00:00:00 2001 From: NiclasOlofsson Date: Sat, 24 Sep 2016 12:05:01 +0200 Subject: [PATCH 01/16] Fix unit-test (don't use Assert.Equals) --- .gitignore | 190 +++++++++++++++++- .../DynamicConverterTests.cs | 3 +- 2 files changed, 186 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 97f08a2..0088cb9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,185 @@ -_ReSharper.LibNbt -fNbt/obj -fNbt.Test/obj -fNbt.Serialization/obj -bin/ -*.user +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files *.suo +*.user +*.sln.docstates + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +build/ +bld/ +[Bb]in/ +[Oo]bj/ + +# Roslyn cache directories +*.ide/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +#NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding addin-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# If using the old MSBuild-Integrated Package Restore, uncomment this: +#!**/packages/repositories.config + +# Windows Azure Build Output +csx/ +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +node_modules/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ +/src/MiNET/packages +/src/MiNET/.vs/config diff --git a/fNbt.Serialization.Test/DynamicConverterTests.cs b/fNbt.Serialization.Test/DynamicConverterTests.cs index 26026b4..aeed7c3 100644 --- a/fNbt.Serialization.Test/DynamicConverterTests.cs +++ b/fNbt.Serialization.Test/DynamicConverterTests.cs @@ -13,7 +13,8 @@ public class DynamicConverterTests { public void PrimitiveTest() { NbtTag intTag = NbtConvert.MakeTag("derp", 1); Assert.IsInstanceOf(intTag); - Assert.Equals(intTag.IntValue, 1); + + Assert.AreEqual(intTag.IntValue, 1); } } } \ No newline at end of file From 61619ac593fe78c992a292850b40b44cc7d43ccc Mon Sep 17 00:00:00 2001 From: NiclasOlofsson Date: Sat, 24 Sep 2016 18:03:39 +0200 Subject: [PATCH 02/16] Fix MCPE 0.16 varint/string hack. --- fNbt/NbtBinaryReader.cs | 210 ++++++++++++++++++++++++++++++++++++++-- fNbt/NbtBinaryWriter.cs | 47 ++++++++- fNbt/NbtFile.cs | 11 ++- fNbt/Tags/NbtInt.cs | 8 +- 4 files changed, 256 insertions(+), 20 deletions(-) diff --git a/fNbt/NbtBinaryReader.cs b/fNbt/NbtBinaryReader.cs index 540b625..5e61fee 100644 --- a/fNbt/NbtBinaryReader.cs +++ b/fNbt/NbtBinaryReader.cs @@ -15,8 +15,9 @@ internal sealed class NbtBinaryReader : BinaryReader { readonly bool swapNeeded; readonly byte[] stringConversionBuffer = new byte[64]; + public bool UseVarInt { get; set; } - public NbtBinaryReader([NotNull] Stream input, bool bigEndian) + public NbtBinaryReader([NotNull] Stream input, bool bigEndian) : base(input) { swapNeeded = (BitConverter.IsLittleEndian == bigEndian); } @@ -50,8 +51,33 @@ public override int ReadInt32() { } } - - public override long ReadInt64() { + public int ReadNbtInt() + { + if (UseVarInt) { + return ReadVarInt(); + } else { + return ReadInt32(); + } + } + + public int ReadVarInt() + { + + var value = VarInt.ReadSInt32(BaseStream); + + + // VarInt is LE by default, so this needs to be reversed + if (!swapNeeded) + { + return Swap(value); + } + else + { + return value; + } + } + + public override long ReadInt64() { if (swapNeeded) { return Swap(base.ReadInt64()); } else { @@ -82,8 +108,14 @@ public override double ReadDouble() { public override string ReadString() { - short length = ReadInt16(); - if (length < 0) { + short length; + if (UseVarInt) { + length = ReadByte(); + } + else { + length = ReadInt16(); + } + if (length < 0) { throw new NbtFormatException("Negative string length given!"); } if (length < stringConversionBuffer.Length) { @@ -137,8 +169,16 @@ public void Skip(int bytesToSkip) { public void SkipString() { - short length = ReadInt16(); - if (length < 0) { + short length; + if (UseVarInt) + { + length = ReadByte(); + } + else + { + length = ReadInt16(); + } + if (length < 0) { throw new NbtFormatException("Negative string length given!"); } Skip(length); @@ -177,5 +217,161 @@ static long Swap(long v) { [CanBeNull] public TagSelector Selector { get; set; } + } + + internal static class VarInt + { + private static uint EncodeZigZag32(int n) + { + // Note: the right-shift must be arithmetic + return (uint)((n << 1) ^ (n >> 31)); + } + + private static int DecodeZigZag32(uint n) + { + return (int)(n >> 1) ^ -(int)(n & 1); + } + + private static ulong EncodeZigZag64(long n) + { + return (ulong)((n << 1) ^ (n >> 63)); + } + + private static long DecodeZigZag64(ulong n) + { + return (long)(n >> 1) ^ -(long)(n & 1); + } + + private static uint ReadRawVarInt32(Stream buf, int maxSize) + { + uint result = 0; + int j = 0; + int b0; + + do + { + b0 = buf.ReadByte(); // -1 if EOS + if (b0 < 0) throw new EndOfStreamException("Not enough bytes for VarInt"); + + result |= (uint)(b0 & 0x7f) << j++ * 7; + + if (j > maxSize) + { + throw new OverflowException("VarInt too big"); + } + } while ((b0 & 0x80) == 0x80); + + return result; + } + + private static ulong ReadRawVarInt64(Stream buf, int maxSize) + { + ulong result = 0; + int j = 0; + int b0; + + do + { + b0 = buf.ReadByte(); // -1 if EOS + if (b0 < 0) throw new EndOfStreamException("Not enough bytes for VarInt"); + + result |= (ulong)(b0 & 0x7f) << j++ * 7; + + if (j > maxSize) + { + throw new OverflowException("VarInt too big"); + } + } while ((b0 & 0x80) == 0x80); + + return result; + } + + private static void WriteRawVarInt32(Stream buf, uint value) + { + while ((value & -128) != 0) + { + buf.WriteByte((byte)((value & 0x7F) | 0x80)); + value >>= 7; + } + + buf.WriteByte((byte)value); + } + + private static void WriteRawVarInt64(Stream buf, ulong value) + { + while ((value & 0xFFFFFFFFFFFFFF80) != 0) + { + buf.WriteByte((byte)((value & 0x7F) | 0x80)); + value >>= 7; + } + + buf.WriteByte((byte)value); + } + + // Int + + public static void WriteInt32(Stream stream, int value) + { + WriteRawVarInt32(stream, (uint)value); + } + + public static int ReadInt32(Stream stream) + { + return (int)ReadRawVarInt32(stream, 5); + } + + public static void WriteSInt32(Stream stream, int value) + { + WriteRawVarInt32(stream, EncodeZigZag32(value)); + } + + public static int ReadSInt32(Stream stream) + { + return DecodeZigZag32(ReadRawVarInt32(stream, 5)); + } + + public static void WriteUInt32(Stream stream, uint value) + { + WriteRawVarInt32(stream, value); + } + + public static uint ReadUInt32(Stream stream) + { + return ReadRawVarInt32(stream, 5); + } + + // Long + + public static void WriteInt64(Stream stream, long value) + { + WriteRawVarInt64(stream, (ulong)value); + } + + public static long ReadInt64(Stream stream) + { + return (long)ReadRawVarInt64(stream, 10); + } + + public static void WriteSInt64(Stream stream, long value) + { + WriteRawVarInt64(stream, EncodeZigZag64(value)); + } + + public static long ReadSInt64(Stream stream) + { + return DecodeZigZag64(ReadRawVarInt64(stream, 10)); + } + + public static void WriteUInt64(Stream stream, ulong value) + { + WriteRawVarInt64(stream, value); + } + + public static ulong ReadUInt64(Stream stream) + { + return ReadRawVarInt64(stream, 10); + } + } + } diff --git a/fNbt/NbtBinaryWriter.cs b/fNbt/NbtBinaryWriter.cs index 3933bf6..d651ee4 100644 --- a/fNbt/NbtBinaryWriter.cs +++ b/fNbt/NbtBinaryWriter.cs @@ -17,7 +17,9 @@ internal sealed unsafe class NbtBinaryWriter { // Each instance has to have its own encoder, because it does maintain state. readonly Encoder encoder = Encoding.GetEncoder(); - public Stream BaseStream { + public bool UseVarInt { get; set; } + + public Stream BaseStream { get { stream.Flush(); return stream; @@ -89,7 +91,36 @@ public void Write(int value) { } - public void Write(long value) { + public void WriteNbtInt(int value) { + if (UseVarInt) { + WriteVarInt(value); + } else { + Write(value); + } + } + + + public void WriteVarInt(int value) { + // VarInt is LE by default + if (swapNeeded) { + VarInt.WriteSInt32(BaseStream, value); + } else { + VarInt.WriteSInt32(BaseStream, SwapInt32(value)); + } + } + + public static short SwapInt16(short v) + { + return (short)(((v & 0xff) << 8) | ((v >> 8) & 0xff)); + } + + public static int SwapInt32(int v) + { + return (int)(((SwapInt16((short)v) & 0xffff) << 0x10) | + (SwapInt16((short)(v >> 0x10)) & 0xffff)); + } + + public void Write(long value) { unchecked { if (swapNeeded) { buffer[0] = (byte)(value >> 56); @@ -169,9 +200,14 @@ public void Write([NotNull] string value) { // Write out string length (as number of bytes) int numBytes = Encoding.GetByteCount(value); - Write((short)numBytes); - - if (numBytes <= BufferSize) { + if (UseVarInt) { + Write((byte)numBytes); + } + else { + Write((short)numBytes); + } + + if (numBytes <= BufferSize) { // If the string fits entirely in the buffer, encode and write it as one Encoding.GetBytes(value, 0, value.Length, buffer, 0); stream.Write(buffer, 0, numBytes); @@ -207,5 +243,6 @@ public void Write(byte[] data, int offset, int count) { written += toWrite; } } + } } diff --git a/fNbt/NbtFile.cs b/fNbt/NbtFile.cs index 5eca2cb..3a38c0f 100644 --- a/fNbt/NbtFile.cs +++ b/fNbt/NbtFile.cs @@ -18,6 +18,8 @@ public sealed class NbtFile { [CanBeNull] public string FileName { get; private set; } + public bool UseVarInt { get; set; } + /// Gets the compression method used for most recent loading/saving of this file. /// Defaults to AutoDetect. public NbtCompression FileCompression { get; private set; } @@ -349,7 +351,8 @@ void LoadFromStreamInternal([NotNull] Stream stream, [CanBeNull] TagSelector tag throw new NbtFormatException("Given NBT stream does not start with a TAG_Compound"); } var reader = new NbtBinaryReader(stream, BigEndian) { - Selector = tagSelector + Selector = tagSelector, + UseVarInt = UseVarInt }; var rootCompound = new NbtCompound(reader.ReadString()); @@ -475,7 +478,7 @@ public long SaveToStream([NotNull] Stream stream, NbtCompression compression) { int checksum; using (var compressStream = new ZLibStream(stream, CompressionMode.Compress, true)) { var bufferedStream = new BufferedStream(compressStream, WriteBufferSize); - RootTag.WriteTag(new NbtBinaryWriter(bufferedStream, BigEndian)); + RootTag.WriteTag(new NbtBinaryWriter(bufferedStream, BigEndian) {UseVarInt = UseVarInt}); bufferedStream.Flush(); checksum = compressStream.Checksum; } @@ -491,13 +494,13 @@ public long SaveToStream([NotNull] Stream stream, NbtCompression compression) { using (var compressStream = new GZipStream(stream, CompressionMode.Compress, true)) { // use a buffered stream to avoid GZipping in small increments (which has a lot of overhead) var bufferedStream = new BufferedStream(compressStream, WriteBufferSize); - RootTag.WriteTag(new NbtBinaryWriter(bufferedStream, BigEndian)); + RootTag.WriteTag(new NbtBinaryWriter(bufferedStream, BigEndian) { UseVarInt = UseVarInt }); bufferedStream.Flush(); } break; case NbtCompression.None: - var writer = new NbtBinaryWriter(stream, BigEndian); + var writer = new NbtBinaryWriter(stream, BigEndian) { UseVarInt = UseVarInt }; RootTag.WriteTag(writer); break; diff --git a/fNbt/Tags/NbtInt.cs b/fNbt/Tags/NbtInt.cs index 0f8fefe..b19aad4 100644 --- a/fNbt/Tags/NbtInt.cs +++ b/fNbt/Tags/NbtInt.cs @@ -54,13 +54,13 @@ internal override bool ReadTag(NbtBinaryReader readStream) { readStream.ReadInt32(); return false; } - Value = readStream.ReadInt32(); + Value = readStream.ReadNbtInt(); return true; } internal override void SkipTag(NbtBinaryReader readStream) { - readStream.ReadInt32(); + readStream.ReadNbtInt(); } @@ -68,12 +68,12 @@ internal override void WriteTag(NbtBinaryWriter writeStream) { writeStream.Write(NbtTagType.Int); if (Name == null) throw new NbtFormatException("Name is null"); writeStream.Write(Name); - writeStream.Write(Value); + writeStream.WriteNbtInt(Value); } internal override void WriteData(NbtBinaryWriter writeStream) { - writeStream.Write(Value); + writeStream.WriteNbtInt(Value); } From c068f207c73a1e79276024fdc7cc67eeb0ef0f1e Mon Sep 17 00:00:00 2001 From: NiclasOlofsson Date: Sun, 2 Oct 2016 15:10:36 +0200 Subject: [PATCH 03/16] Fix non-swap for VarInt. Always LE. Add package spec. --- fNbt/NbtBinaryReader.cs | 14 +------------- fNbt/NbtBinaryWriter.cs | 6 +----- fNbt/Tags/NbtInt.cs | 2 +- fNbt/fNbt.csproj | 4 +++- fNbt/fNbt.nuspec | 17 +++++++++++++++++ 5 files changed, 23 insertions(+), 20 deletions(-) create mode 100644 fNbt/fNbt.nuspec diff --git a/fNbt/NbtBinaryReader.cs b/fNbt/NbtBinaryReader.cs index 5e61fee..374eb83 100644 --- a/fNbt/NbtBinaryReader.cs +++ b/fNbt/NbtBinaryReader.cs @@ -62,19 +62,7 @@ public int ReadNbtInt() public int ReadVarInt() { - - var value = VarInt.ReadSInt32(BaseStream); - - - // VarInt is LE by default, so this needs to be reversed - if (!swapNeeded) - { - return Swap(value); - } - else - { - return value; - } + return VarInt.ReadSInt32(BaseStream); } public override long ReadInt64() { diff --git a/fNbt/NbtBinaryWriter.cs b/fNbt/NbtBinaryWriter.cs index d651ee4..148c103 100644 --- a/fNbt/NbtBinaryWriter.cs +++ b/fNbt/NbtBinaryWriter.cs @@ -102,11 +102,7 @@ public void WriteNbtInt(int value) { public void WriteVarInt(int value) { // VarInt is LE by default - if (swapNeeded) { - VarInt.WriteSInt32(BaseStream, value); - } else { - VarInt.WriteSInt32(BaseStream, SwapInt32(value)); - } + VarInt.WriteSInt32(BaseStream, value); } public static short SwapInt16(short v) diff --git a/fNbt/Tags/NbtInt.cs b/fNbt/Tags/NbtInt.cs index b19aad4..72765c9 100644 --- a/fNbt/Tags/NbtInt.cs +++ b/fNbt/Tags/NbtInt.cs @@ -51,7 +51,7 @@ public NbtInt([NotNull] NbtInt other) { internal override bool ReadTag(NbtBinaryReader readStream) { if (readStream.Selector != null && !readStream.Selector(this)) { - readStream.ReadInt32(); + SkipTag(readStream); return false; } Value = readStream.ReadNbtInt(); diff --git a/fNbt/fNbt.csproj b/fNbt/fNbt.csproj index 1822ee5..3fcc087 100644 --- a/fNbt/fNbt.csproj +++ b/fNbt/fNbt.csproj @@ -137,5 +137,7 @@ - + + + \ No newline at end of file diff --git a/fNbt/fNbt.nuspec b/fNbt/fNbt.nuspec new file mode 100644 index 0000000..d4c5a91 --- /dev/null +++ b/fNbt/fNbt.nuspec @@ -0,0 +1,17 @@ + + + + MiNET.fnbt + $version$ + MiNET.fnbt + gurun + gurun + https://github.com/NiclasOlofsson/fNbt/blob/master/docs/LICENSE + https://github.com/NiclasOlofsson/fNbt + false + MiNET fnbt version with support for MCPE 0.16+ varint and string. + MiNET fnbt version with support for MCPE 0.16+ varint and string. + 2010-2011 Erik Davidson; 2012-2015 Matvei Stefarov + MiNET fnbt nbt MCPE varint and string. + + \ No newline at end of file From 0602d4ddef4bd9b3149630930707ede5aeeaa2d4 Mon Sep 17 00:00:00 2001 From: NiclasOlofsson Date: Sun, 2 Oct 2016 15:14:30 +0200 Subject: [PATCH 04/16] Release 0.6.4 --- fNbt/Properties/AssemblyInfo.cs | 4 ++-- fNbt/fNbt.nuspec | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fNbt/Properties/AssemblyInfo.cs b/fNbt/Properties/AssemblyInfo.cs index 3054b4c..a386a34 100644 --- a/fNbt/Properties/AssemblyInfo.cs +++ b/fNbt/Properties/AssemblyInfo.cs @@ -36,8 +36,8 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.6.3.0")] -[assembly: AssemblyFileVersion("0.6.3.0")] +[assembly: AssemblyVersion("0.6.4.0")] +[assembly: AssemblyFileVersion("0.6.4.0")] // Potentially speed up resource probes diff --git a/fNbt/fNbt.nuspec b/fNbt/fNbt.nuspec index d4c5a91..03b8cf3 100644 --- a/fNbt/fNbt.nuspec +++ b/fNbt/fNbt.nuspec @@ -11,7 +11,7 @@ false MiNET fnbt version with support for MCPE 0.16+ varint and string. MiNET fnbt version with support for MCPE 0.16+ varint and string. - 2010-2011 Erik Davidson; 2012-2015 Matvei Stefarov + 2010-2011 Erik Davidson; 2012-2015 Matvei Stefarov; 2016 Niclas Olofsson MiNET fnbt nbt MCPE varint and string. \ No newline at end of file From 7263678399563ae967582b02a94506c841ca4969 Mon Sep 17 00:00:00 2001 From: NiclasOlofsson Date: Mon, 3 Oct 2016 18:39:40 +0200 Subject: [PATCH 05/16] Update all former Int to now VarInt alternative. --- fNbt/NbtBinaryReader.cs | 21 ++++++++------------- fNbt/NbtBinaryWriter.cs | 3 +-- fNbt/Properties/AssemblyInfo.cs | 4 ++-- fNbt/Tags/NbtInt.cs | 4 ++-- fNbt/fNbt.nuspec | 1 + 5 files changed, 14 insertions(+), 19 deletions(-) diff --git a/fNbt/NbtBinaryReader.cs b/fNbt/NbtBinaryReader.cs index 374eb83..e3db5ff 100644 --- a/fNbt/NbtBinaryReader.cs +++ b/fNbt/NbtBinaryReader.cs @@ -7,7 +7,7 @@ namespace fNbt { /// BinaryReader wrapper that takes care of reading primitives from an NBT stream, /// while taking care of endianness, string encoding, and skipping. - internal sealed class NbtBinaryReader : BinaryReader { + public sealed class NbtBinaryReader : BinaryReader { readonly byte[] buffer = new byte[sizeof(double)]; byte[] seekBuffer; @@ -44,22 +44,17 @@ public override short ReadInt16() { public override int ReadInt32() { - if (swapNeeded) { - return Swap(base.ReadInt32()); + if (UseVarInt) { + return ReadVarInt(); } else { - return base.ReadInt32(); + if (swapNeeded) { + return Swap(base.ReadInt32()); + } else { + return base.ReadInt32(); + } } } - public int ReadNbtInt() - { - if (UseVarInt) { - return ReadVarInt(); - } else { - return ReadInt32(); - } - } - public int ReadVarInt() { return VarInt.ReadSInt32(BaseStream); diff --git a/fNbt/NbtBinaryWriter.cs b/fNbt/NbtBinaryWriter.cs index 148c103..d7da126 100644 --- a/fNbt/NbtBinaryWriter.cs +++ b/fNbt/NbtBinaryWriter.cs @@ -6,7 +6,7 @@ namespace fNbt { /// BinaryWriter wrapper that writes NBT primitives to a stream, /// while taking care of endianness and string encoding, and counting bytes written. - internal sealed unsafe class NbtBinaryWriter { + public sealed unsafe class NbtBinaryWriter { // Write at most 512 MiB at a time. // This works around an overflow in BufferedStream.Write(byte[]) that happens on 1 GiB+ writes. public const int MaxWriteChunk = 512*1024*1024; @@ -230,7 +230,6 @@ public void Write([NotNull] string value) { } } - public void Write(byte[] data, int offset, int count) { int written = 0; while (written < count) { diff --git a/fNbt/Properties/AssemblyInfo.cs b/fNbt/Properties/AssemblyInfo.cs index a386a34..f2f2b41 100644 --- a/fNbt/Properties/AssemblyInfo.cs +++ b/fNbt/Properties/AssemblyInfo.cs @@ -36,8 +36,8 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.6.4.0")] -[assembly: AssemblyFileVersion("0.6.4.0")] +[assembly: AssemblyVersion("0.6.8.0")] +[assembly: AssemblyFileVersion("0.6.8.0")] // Potentially speed up resource probes diff --git a/fNbt/Tags/NbtInt.cs b/fNbt/Tags/NbtInt.cs index 72765c9..5ffe6f3 100644 --- a/fNbt/Tags/NbtInt.cs +++ b/fNbt/Tags/NbtInt.cs @@ -54,13 +54,13 @@ internal override bool ReadTag(NbtBinaryReader readStream) { SkipTag(readStream); return false; } - Value = readStream.ReadNbtInt(); + Value = readStream.ReadInt32(); return true; } internal override void SkipTag(NbtBinaryReader readStream) { - readStream.ReadNbtInt(); + readStream.ReadInt32(); } diff --git a/fNbt/fNbt.nuspec b/fNbt/fNbt.nuspec index 03b8cf3..39cb287 100644 --- a/fNbt/fNbt.nuspec +++ b/fNbt/fNbt.nuspec @@ -8,6 +8,7 @@ gurun https://github.com/NiclasOlofsson/fNbt/blob/master/docs/LICENSE https://github.com/NiclasOlofsson/fNbt + false MiNET fnbt version with support for MCPE 0.16+ varint and string. MiNET fnbt version with support for MCPE 0.16+ varint and string. From b8391ba7c3b7b8d0395337ec9c05c62747e6df37 Mon Sep 17 00:00:00 2001 From: NiclasOlofsson Date: Wed, 5 Oct 2016 17:31:40 +0200 Subject: [PATCH 06/16] Also do the writer side of things :-P --- fNbt/NbtBinaryWriter.cs | 35 ++++++++++++++------------------- fNbt/Properties/AssemblyInfo.cs | 4 ++-- fNbt/Tags/NbtInt.cs | 4 ++-- 3 files changed, 19 insertions(+), 24 deletions(-) diff --git a/fNbt/NbtBinaryWriter.cs b/fNbt/NbtBinaryWriter.cs index d7da126..4476dc9 100644 --- a/fNbt/NbtBinaryWriter.cs +++ b/fNbt/NbtBinaryWriter.cs @@ -73,29 +73,24 @@ public void Write(short value) { } - public void Write(int value) { - unchecked { - if (swapNeeded) { - buffer[0] = (byte)(value >> 24); - buffer[1] = (byte)(value >> 16); - buffer[2] = (byte)(value >> 8); - buffer[3] = (byte)value; - } else { - buffer[0] = (byte)value; - buffer[1] = (byte)(value >> 8); - buffer[2] = (byte)(value >> 16); - buffer[3] = (byte)(value >> 24); - } - } - stream.Write(buffer, 0, 4); - } - - - public void WriteNbtInt(int value) { + public void Write(int value) { if (UseVarInt) { WriteVarInt(value); } else { - Write(value); + unchecked { + if (swapNeeded) { + buffer[0] = (byte)(value >> 24); + buffer[1] = (byte)(value >> 16); + buffer[2] = (byte)(value >> 8); + buffer[3] = (byte)value; + } else { + buffer[0] = (byte)value; + buffer[1] = (byte)(value >> 8); + buffer[2] = (byte)(value >> 16); + buffer[3] = (byte)(value >> 24); + } + } + stream.Write(buffer, 0, 4); } } diff --git a/fNbt/Properties/AssemblyInfo.cs b/fNbt/Properties/AssemblyInfo.cs index f2f2b41..60644c1 100644 --- a/fNbt/Properties/AssemblyInfo.cs +++ b/fNbt/Properties/AssemblyInfo.cs @@ -36,8 +36,8 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.6.8.0")] -[assembly: AssemblyFileVersion("0.6.8.0")] +[assembly: AssemblyVersion("0.6.9.0")] +[assembly: AssemblyFileVersion("0.6.9.0")] // Potentially speed up resource probes diff --git a/fNbt/Tags/NbtInt.cs b/fNbt/Tags/NbtInt.cs index 5ffe6f3..c9e0091 100644 --- a/fNbt/Tags/NbtInt.cs +++ b/fNbt/Tags/NbtInt.cs @@ -68,12 +68,12 @@ internal override void WriteTag(NbtBinaryWriter writeStream) { writeStream.Write(NbtTagType.Int); if (Name == null) throw new NbtFormatException("Name is null"); writeStream.Write(Name); - writeStream.WriteNbtInt(Value); + writeStream.Write(Value); } internal override void WriteData(NbtBinaryWriter writeStream) { - writeStream.WriteNbtInt(Value); + writeStream.Write(Value); } From fde37463a4da9e3b85090fe1f5d37778f223df10 Mon Sep 17 00:00:00 2001 From: NiclasOlofsson Date: Mon, 2 Oct 2017 00:45:28 +0200 Subject: [PATCH 07/16] Fix new build. --- fNbt.Test/fNbt.Test.csproj | 13 ++++++++++--- fNbt.sln | 24 ++---------------------- fNbt.sln.DotSettings | 3 +++ fNbt/fNbt.csproj | 13 ++++++++++--- fNbt/fNbt.nuspec | 4 ++-- 5 files changed, 27 insertions(+), 30 deletions(-) diff --git a/fNbt.Test/fNbt.Test.csproj b/fNbt.Test/fNbt.Test.csproj index 8da84f7..1fc8f56 100644 --- a/fNbt.Test/fNbt.Test.csproj +++ b/fNbt.Test/fNbt.Test.csproj @@ -1,5 +1,5 @@  - + Debug AnyCPU @@ -10,13 +10,14 @@ Properties fNbt.Test fNbt.Test - v3.5 + v4.6.1 512 3.5 - Client + + true @@ -27,6 +28,7 @@ prompt 4 false + false pdbonly @@ -35,6 +37,7 @@ TRACE prompt 4 + false true @@ -45,6 +48,7 @@ prompt true true + false ..\bin\x64\Release\ @@ -54,6 +58,7 @@ prompt false false + false true @@ -65,6 +70,7 @@ true true false + false ..\bin\x86\Release\ @@ -74,6 +80,7 @@ prompt false false + false diff --git a/fNbt.sln b/fNbt.sln index 37b134f..1ed971e 100644 --- a/fNbt.sln +++ b/fNbt.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 +# Visual Studio 15 +VisualStudioVersion = 15.0.26430.15 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{83C41F58-F6F7-46F2-85C3-CDD69E7FBEE6}" ProjectSection(SolutionItems) = preProject @@ -19,10 +19,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Dependencies", "Dependencie Dependencies\nunit.framework.dll = Dependencies\nunit.framework.dll EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "fNbt.Serialization", "fNbt.Serialization\fNbt.Serialization.csproj", "{95238D45-EC60-419F-90E1-7064EA738079}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "fNbt.Serialization.Test", "fNbt.Serialization.Test\fNbt.Serialization.Test.csproj", "{1A9A2746-62D1-49E6-80EF-FC3305A1CFE0}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -57,22 +53,6 @@ Global {8DD93C35-682E-4C62-9012-EF15C80FFFEA}.Release|x64.Build.0 = Release|x64 {8DD93C35-682E-4C62-9012-EF15C80FFFEA}.Release|x86.ActiveCfg = Release|x86 {8DD93C35-682E-4C62-9012-EF15C80FFFEA}.Release|x86.Build.0 = Release|x86 - {95238D45-EC60-419F-90E1-7064EA738079}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {95238D45-EC60-419F-90E1-7064EA738079}.Debug|Any CPU.Build.0 = Debug|Any CPU - {95238D45-EC60-419F-90E1-7064EA738079}.Debug|x64.ActiveCfg = Debug|Any CPU - {95238D45-EC60-419F-90E1-7064EA738079}.Debug|x86.ActiveCfg = Debug|Any CPU - {95238D45-EC60-419F-90E1-7064EA738079}.Release|Any CPU.ActiveCfg = Release|Any CPU - {95238D45-EC60-419F-90E1-7064EA738079}.Release|Any CPU.Build.0 = Release|Any CPU - {95238D45-EC60-419F-90E1-7064EA738079}.Release|x64.ActiveCfg = Release|Any CPU - {95238D45-EC60-419F-90E1-7064EA738079}.Release|x86.ActiveCfg = Release|Any CPU - {1A9A2746-62D1-49E6-80EF-FC3305A1CFE0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1A9A2746-62D1-49E6-80EF-FC3305A1CFE0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1A9A2746-62D1-49E6-80EF-FC3305A1CFE0}.Debug|x64.ActiveCfg = Debug|Any CPU - {1A9A2746-62D1-49E6-80EF-FC3305A1CFE0}.Debug|x86.ActiveCfg = Debug|Any CPU - {1A9A2746-62D1-49E6-80EF-FC3305A1CFE0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1A9A2746-62D1-49E6-80EF-FC3305A1CFE0}.Release|Any CPU.Build.0 = Release|Any CPU - {1A9A2746-62D1-49E6-80EF-FC3305A1CFE0}.Release|x64.ActiveCfg = Release|Any CPU - {1A9A2746-62D1-49E6-80EF-FC3305A1CFE0}.Release|x86.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/fNbt.sln.DotSettings b/fNbt.sln.DotSettings index 3b827e4..2d0e558 100644 --- a/fNbt.sln.DotSettings +++ b/fNbt.sln.DotSettings @@ -165,5 +165,8 @@ True True True + True + True + True <data /> <data><IncludeFilters /><ExcludeFilters><Filter ModuleMask="fNbt" ModuleVersionMask="*" ClassMask="fNbt.ByteCountingStream" FunctionMask="*" IsEnabled="True" /><Filter ModuleMask="fNbt.Test" ModuleVersionMask="*" ClassMask="*" FunctionMask="*" IsEnabled="True" /><Filter ModuleMask="fNbt.Serialization" ModuleVersionMask="*" ClassMask="*" FunctionMask="*" IsEnabled="True" /></ExcludeFilters></data> \ No newline at end of file diff --git a/fNbt/fNbt.csproj b/fNbt/fNbt.csproj index 3fcc087..3dd6174 100644 --- a/fNbt/fNbt.csproj +++ b/fNbt/fNbt.csproj @@ -1,5 +1,5 @@  - + Debug AnyCPU @@ -13,8 +13,9 @@ 3.5 - v3.5 - Client + v4.6.1 + + true @@ -30,6 +31,7 @@ MinimumRecommendedRules.ruleset true false + false pdbonly @@ -46,6 +48,7 @@ false true + false fNbt @@ -61,6 +64,7 @@ prompt MinimumRecommendedRules.ruleset false + false true @@ -74,6 +78,7 @@ false false false + false true @@ -88,6 +93,7 @@ false false false + false true @@ -101,6 +107,7 @@ false false false + false diff --git a/fNbt/fNbt.nuspec b/fNbt/fNbt.nuspec index 39cb287..36f0491 100644 --- a/fNbt/fNbt.nuspec +++ b/fNbt/fNbt.nuspec @@ -4,8 +4,8 @@ MiNET.fnbt $version$ MiNET.fnbt - gurun - gurun + $author$ + $author$ https://github.com/NiclasOlofsson/fNbt/blob/master/docs/LICENSE https://github.com/NiclasOlofsson/fNbt From c68cab7af692c9d9ef19b3e188ff4d58afe6db25 Mon Sep 17 00:00:00 2001 From: NiclasOlofsson Date: Sat, 25 Nov 2017 14:16:14 +0100 Subject: [PATCH 08/16] Fix NbtLong to use VarLong when varints are used. --- .gitignore | 1 + fNbt/NbtBinaryReader.cs | 36 ++++++++++++++-------- fNbt/NbtBinaryWriter.cs | 68 ++++++++++++++++++++++++----------------- 3 files changed, 65 insertions(+), 40 deletions(-) diff --git a/.gitignore b/.gitignore index 0088cb9..c1cb72c 100644 --- a/.gitignore +++ b/.gitignore @@ -183,3 +183,4 @@ UpgradeLog*.htm FakesAssemblies/ /src/MiNET/packages /src/MiNET/.vs/config +/.vs diff --git a/fNbt/NbtBinaryReader.cs b/fNbt/NbtBinaryReader.cs index e3db5ff..57fc587 100644 --- a/fNbt/NbtBinaryReader.cs +++ b/fNbt/NbtBinaryReader.cs @@ -60,16 +60,25 @@ public int ReadVarInt() return VarInt.ReadSInt32(BaseStream); } - public override long ReadInt64() { - if (swapNeeded) { - return Swap(base.ReadInt64()); - } else { - return base.ReadInt64(); - } - } - - public override float ReadSingle() { + public override long ReadInt64() { + if (UseVarInt) { + return ReadVarLong(); + } else { + if (swapNeeded) { + return Swap(base.ReadInt64()); + } else { + return base.ReadInt64(); + } + } + } + + public long ReadVarLong() + { + return VarInt.ReadSInt64(BaseStream); + } + + public override float ReadSingle() { if (swapNeeded) { FillBuffer(sizeof(float)); Array.Reverse(buffer, 0, sizeof(float)); @@ -89,11 +98,14 @@ public override double ReadDouble() { return base.ReadDouble(); } + public int ReadLenght() { + return (int)VarInt.ReadUInt32(BaseStream); + } - public override string ReadString() { - short length; + public override string ReadString() { + int length; if (UseVarInt) { - length = ReadByte(); + length = ReadLenght(); } else { length = ReadInt16(); diff --git a/fNbt/NbtBinaryWriter.cs b/fNbt/NbtBinaryWriter.cs index 4476dc9..5820eb2 100644 --- a/fNbt/NbtBinaryWriter.cs +++ b/fNbt/NbtBinaryWriter.cs @@ -111,33 +111,41 @@ public static int SwapInt32(int v) (SwapInt16((short)(v >> 0x10)) & 0xffff)); } - public void Write(long value) { - unchecked { - if (swapNeeded) { - buffer[0] = (byte)(value >> 56); - buffer[1] = (byte)(value >> 48); - buffer[2] = (byte)(value >> 40); - buffer[3] = (byte)(value >> 32); - buffer[4] = (byte)(value >> 24); - buffer[5] = (byte)(value >> 16); - buffer[6] = (byte)(value >> 8); - buffer[7] = (byte)value; - } else { - buffer[0] = (byte)value; - buffer[1] = (byte)(value >> 8); - buffer[2] = (byte)(value >> 16); - buffer[3] = (byte)(value >> 24); - buffer[4] = (byte)(value >> 32); - buffer[5] = (byte)(value >> 40); - buffer[6] = (byte)(value >> 48); - buffer[7] = (byte)(value >> 56); - } - } - stream.Write(buffer, 0, 8); - } + public void Write(long value) { + if (UseVarInt) { + WriteVarLong(value); + } else { + unchecked { + if (swapNeeded) { + buffer[0] = (byte)(value >> 56); + buffer[1] = (byte)(value >> 48); + buffer[2] = (byte)(value >> 40); + buffer[3] = (byte)(value >> 32); + buffer[4] = (byte)(value >> 24); + buffer[5] = (byte)(value >> 16); + buffer[6] = (byte)(value >> 8); + buffer[7] = (byte)value; + } else { + buffer[0] = (byte)value; + buffer[1] = (byte)(value >> 8); + buffer[2] = (byte)(value >> 16); + buffer[3] = (byte)(value >> 24); + buffer[4] = (byte)(value >> 32); + buffer[5] = (byte)(value >> 40); + buffer[6] = (byte)(value >> 48); + buffer[7] = (byte)(value >> 56); + } + } + stream.Write(buffer, 0, 8); + } + } + + public void WriteVarLong(long value) { + VarInt.WriteSInt64(BaseStream, value); + } - public void Write(float value) { + public void Write(float value) { ulong tmpValue = *(uint*)&value; unchecked { if (swapNeeded) { @@ -183,8 +191,12 @@ public void Write(double value) { } - // Based on BinaryWriter.Write(String) - public void Write([NotNull] string value) { + public void WriteLength(int value) { + VarInt.WriteUInt32(BaseStream, (uint)value); + } + + // Based on BinaryWriter.Write(String) + public void Write([NotNull] string value) { if (value == null) { throw new ArgumentNullException("value"); } @@ -192,7 +204,7 @@ public void Write([NotNull] string value) { // Write out string length (as number of bytes) int numBytes = Encoding.GetByteCount(value); if (UseVarInt) { - Write((byte)numBytes); + WriteLength(numBytes); } else { Write((short)numBytes); From eef06b2f5d1f3fe430085fa7f3097e43f9f0578c Mon Sep 17 00:00:00 2001 From: Niclas Olofsson Date: Wed, 4 Jul 2018 21:27:34 +0200 Subject: [PATCH 09/16] Port to .NET Core --- fNbt.Test/Properties/AssemblyInfo.cs | 39 ------ fNbt.Test/fNbt.Test.csproj | 160 +++--------------------- fNbt.sln | 35 +++--- fNbt.sln.DotSettings | 9 ++ fNbt/Properties/AssemblyInfo.cs | 44 ------- fNbt/fNbt.csproj | 178 +++++---------------------- 6 files changed, 76 insertions(+), 389 deletions(-) delete mode 100644 fNbt.Test/Properties/AssemblyInfo.cs delete mode 100644 fNbt/Properties/AssemblyInfo.cs diff --git a/fNbt.Test/Properties/AssemblyInfo.cs b/fNbt.Test/Properties/AssemblyInfo.cs deleted file mode 100644 index 6706154..0000000 --- a/fNbt.Test/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. - -[assembly: AssemblyTitle("fNbt.Test")] -[assembly: AssemblyDescription("NUnit tests for fNbt library.")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("github.com/fragmer/fNbt")] -[assembly: AssemblyProduct("fNbt.Test")] -[assembly: AssemblyCopyright("2012-2015 Matvei Stefarov")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. - -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM - -[assembly: Guid("37d4ff8c-3e40-4b11-a147-add3cdfb1c5f")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] - -[assembly: AssemblyVersion("0.6.3.0")] -[assembly: AssemblyFileVersion("0.6.3.0")] diff --git a/fNbt.Test/fNbt.Test.csproj b/fNbt.Test/fNbt.Test.csproj index 1fc8f56..14af7dd 100644 --- a/fNbt.Test/fNbt.Test.csproj +++ b/fNbt.Test/fNbt.Test.csproj @@ -1,140 +1,20 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {8DD93C35-682E-4C62-9012-EF15C80FFFEA} - Library - Properties - fNbt.Test - fNbt.Test - v4.6.1 - 512 - - - 3.5 - - - - - - true - full - false - ..\bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - false - - - pdbonly - false - ..\bin\Release\ - TRACE - prompt - 4 - false - - - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - true - true - false - - - ..\bin\x64\Release\ - TRACE - pdbonly - x64 - prompt - false - false - false - - - true - bin\x86\Debug\ - DEBUG;TRACE - full - x86 - prompt - true - true - false - false - - - ..\bin\x86\Release\ - TRACE - pdbonly - x86 - prompt - false - false - false - - - - False - ..\Dependencies\nunit.framework.dll - - - - - - - - - - - - - - - - - - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - - - {4488498D-976D-4DA3-BF72-109531AF0488} - fNbt - - - - - \ No newline at end of file + + + + netcoreapp2.1 + + false + + + + + + + + + + + + + + diff --git a/fNbt.sln b/fNbt.sln index 1ed971e..241276e 100644 --- a/fNbt.sln +++ b/fNbt.sln @@ -31,32 +31,35 @@ Global GlobalSection(ProjectConfigurationPlatforms) = postSolution {4488498D-976D-4DA3-BF72-109531AF0488}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4488498D-976D-4DA3-BF72-109531AF0488}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4488498D-976D-4DA3-BF72-109531AF0488}.Debug|x64.ActiveCfg = Debug|x64 - {4488498D-976D-4DA3-BF72-109531AF0488}.Debug|x64.Build.0 = Debug|x64 - {4488498D-976D-4DA3-BF72-109531AF0488}.Debug|x86.ActiveCfg = Debug|x86 - {4488498D-976D-4DA3-BF72-109531AF0488}.Debug|x86.Build.0 = Debug|x86 + {4488498D-976D-4DA3-BF72-109531AF0488}.Debug|x64.ActiveCfg = Debug|Any CPU + {4488498D-976D-4DA3-BF72-109531AF0488}.Debug|x64.Build.0 = Debug|Any CPU + {4488498D-976D-4DA3-BF72-109531AF0488}.Debug|x86.ActiveCfg = Debug|Any CPU + {4488498D-976D-4DA3-BF72-109531AF0488}.Debug|x86.Build.0 = Debug|Any CPU {4488498D-976D-4DA3-BF72-109531AF0488}.Release|Any CPU.ActiveCfg = Release|Any CPU {4488498D-976D-4DA3-BF72-109531AF0488}.Release|Any CPU.Build.0 = Release|Any CPU - {4488498D-976D-4DA3-BF72-109531AF0488}.Release|x64.ActiveCfg = Release|x64 - {4488498D-976D-4DA3-BF72-109531AF0488}.Release|x64.Build.0 = Release|x64 - {4488498D-976D-4DA3-BF72-109531AF0488}.Release|x86.ActiveCfg = Release|x86 - {4488498D-976D-4DA3-BF72-109531AF0488}.Release|x86.Build.0 = Release|x86 + {4488498D-976D-4DA3-BF72-109531AF0488}.Release|x64.ActiveCfg = Release|Any CPU + {4488498D-976D-4DA3-BF72-109531AF0488}.Release|x64.Build.0 = Release|Any CPU + {4488498D-976D-4DA3-BF72-109531AF0488}.Release|x86.ActiveCfg = Release|Any CPU + {4488498D-976D-4DA3-BF72-109531AF0488}.Release|x86.Build.0 = Release|Any CPU {8DD93C35-682E-4C62-9012-EF15C80FFFEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8DD93C35-682E-4C62-9012-EF15C80FFFEA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8DD93C35-682E-4C62-9012-EF15C80FFFEA}.Debug|x64.ActiveCfg = Debug|x64 - {8DD93C35-682E-4C62-9012-EF15C80FFFEA}.Debug|x64.Build.0 = Debug|x64 - {8DD93C35-682E-4C62-9012-EF15C80FFFEA}.Debug|x86.ActiveCfg = Debug|x86 - {8DD93C35-682E-4C62-9012-EF15C80FFFEA}.Debug|x86.Build.0 = Debug|x86 + {8DD93C35-682E-4C62-9012-EF15C80FFFEA}.Debug|x64.ActiveCfg = Debug|Any CPU + {8DD93C35-682E-4C62-9012-EF15C80FFFEA}.Debug|x64.Build.0 = Debug|Any CPU + {8DD93C35-682E-4C62-9012-EF15C80FFFEA}.Debug|x86.ActiveCfg = Debug|Any CPU + {8DD93C35-682E-4C62-9012-EF15C80FFFEA}.Debug|x86.Build.0 = Debug|Any CPU {8DD93C35-682E-4C62-9012-EF15C80FFFEA}.Release|Any CPU.ActiveCfg = Release|Any CPU {8DD93C35-682E-4C62-9012-EF15C80FFFEA}.Release|Any CPU.Build.0 = Release|Any CPU - {8DD93C35-682E-4C62-9012-EF15C80FFFEA}.Release|x64.ActiveCfg = Release|x64 - {8DD93C35-682E-4C62-9012-EF15C80FFFEA}.Release|x64.Build.0 = Release|x64 - {8DD93C35-682E-4C62-9012-EF15C80FFFEA}.Release|x86.ActiveCfg = Release|x86 - {8DD93C35-682E-4C62-9012-EF15C80FFFEA}.Release|x86.Build.0 = Release|x86 + {8DD93C35-682E-4C62-9012-EF15C80FFFEA}.Release|x64.ActiveCfg = Release|Any CPU + {8DD93C35-682E-4C62-9012-EF15C80FFFEA}.Release|x64.Build.0 = Release|Any CPU + {8DD93C35-682E-4C62-9012-EF15C80FFFEA}.Release|x86.ActiveCfg = Release|Any CPU + {8DD93C35-682E-4C62-9012-EF15C80FFFEA}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {3755B0ED-846A-4637-845E-86D361E90B31} + EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution StartupItem = fNbt.csproj EndGlobalSection diff --git a/fNbt.sln.DotSettings b/fNbt.sln.DotSettings index 2d0e558..de2d953 100644 --- a/fNbt.sln.DotSettings +++ b/fNbt.sln.DotSettings @@ -34,12 +34,16 @@ END_OF_LINE True END_OF_LINE + NEVER + NEVER False False False False + NEVER False False + ALWAYS False ON_SINGLE_LINE False @@ -161,7 +165,12 @@ <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> <Policy Inspect="True" Prefix="T" Suffix="" Style="AaBb" /> <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> + True + True + True + True True + True True True True diff --git a/fNbt/Properties/AssemblyInfo.cs b/fNbt/Properties/AssemblyInfo.cs deleted file mode 100644 index 60644c1..0000000 --- a/fNbt/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System.Reflection; -using System.Resources; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. - -[assembly: AssemblyTitle("fNbt")] -[assembly: AssemblyDescription("A library for working with NBT files and streams.")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("github.com/fragmer/fNbt")] -[assembly: AssemblyProduct("fNbt")] -[assembly: AssemblyCopyright("2012-2015 Matvei Stefarov")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. - -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM - -[assembly: Guid("9253db1f-f1d4-45aa-a277-4f3ba635d651")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] - -[assembly: AssemblyVersion("0.6.9.0")] -[assembly: AssemblyFileVersion("0.6.9.0")] - -// Potentially speed up resource probes - -[assembly: NeutralResourcesLanguage("en-US")] diff --git a/fNbt/fNbt.csproj b/fNbt/fNbt.csproj index 3dd6174..2e5d89d 100644 --- a/fNbt/fNbt.csproj +++ b/fNbt/fNbt.csproj @@ -1,150 +1,28 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {4488498D-976D-4DA3-BF72-109531AF0488} - Library - fNbt - - - 3.5 - - - v4.6.1 - - - - - true - full - false - ..\bin\Debug\ - DEBUG - prompt - 4 - false - ..\bin\Debug\fNbt.xml - false - MinimumRecommendedRules.ruleset - true - false - false - - - pdbonly - true - ..\bin\Release\ - prompt - 4 - false - false - ..\bin\Release\fNbt.xml - MinimumRecommendedRules.ruleset - true - - - false - true - false - - - fNbt - - - true - bin\x64\Debug\ - DEBUG - ..\bin\Debug\fNbt.xml - full - x64 - true - prompt - MinimumRecommendedRules.ruleset - false - false - - - true - ..\bin\x64\Release\ - ..\bin\x64\Release\fNbt.xml - true - pdbonly - x64 - prompt - MinimumRecommendedRules.ruleset - false - false - false - false - - - true - bin\x86\Debug\ - DEBUG - ..\bin\Debug\fNbt.xml - full - x86 - true - prompt - MinimumRecommendedRules.ruleset - false - false - false - false - - - true - ..\bin\x86\Release\ - ..\bin\x86\Release\fNbt.xml - true - pdbonly - x86 - prompt - MinimumRecommendedRules.ruleset - false - false - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + netcoreapp2.1 + true + + true + MiNET.fnbt + 0.0.0 + gurun + Niclas Olofsson + MiNET fnbt version with support for MCPE 0.16+ varint and string. + 2010-2011 Erik Davidson; 2012-2015 Matvei Stefarov; 2016-2018 Niclas Olofsson + https://github.com/NiclasOlofsson/fNbt/blob/master/docs/LICENSE + https://github.com/NiclasOlofsson/fNbt + + MiNET fnbt nbt MCPE varint and string + 1.0.0.0 + 1.0.0.0 + + + + + latest + 1701;1702;1701 + + + From dae9301b1a5ef75c455009bf6594556c8b597e3b Mon Sep 17 00:00:00 2001 From: Niclas Olofsson Date: Wed, 4 Jul 2018 21:47:54 +0200 Subject: [PATCH 10/16] Fix unit testing. Fixed appveyor build. --- fNbt.Test/fNbt.Test.csproj | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/fNbt.Test/fNbt.Test.csproj b/fNbt.Test/fNbt.Test.csproj index 14af7dd..9c60029 100644 --- a/fNbt.Test/fNbt.Test.csproj +++ b/fNbt.Test/fNbt.Test.csproj @@ -7,14 +7,34 @@ - - - - + + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + From 8000b0caffe6c1c54d0e9328f26c10663101f27f Mon Sep 17 00:00:00 2001 From: Kenny van Vulpen Date: Wed, 4 Jul 2018 22:08:46 +0200 Subject: [PATCH 11/16] Add long array --- fNbt/NbtBinaryReader.cs | 2 +- fNbt/NbtTagType.cs | 7 +- fNbt/Tags/NbtCompound.cs | 9 ++ fNbt/Tags/NbtLongArray.cs | 172 ++++++++++++++++++++++++++++++++++++++ fNbt/Tags/NbtTag.cs | 24 +++++- 5 files changed, 208 insertions(+), 6 deletions(-) create mode 100644 fNbt/Tags/NbtLongArray.cs diff --git a/fNbt/NbtBinaryReader.cs b/fNbt/NbtBinaryReader.cs index 57fc587..88d4ac0 100644 --- a/fNbt/NbtBinaryReader.cs +++ b/fNbt/NbtBinaryReader.cs @@ -27,7 +27,7 @@ public NbtTagType ReadTagType() { int type = ReadByte(); if (type < 0) { throw new EndOfStreamException(); - } else if (type > (int)NbtTagType.IntArray) { + } else if (type > (int)NbtTagType.LongArray) { throw new NbtFormatException("NBT tag type out of range: " + type); } return (NbtTagType)type; diff --git a/fNbt/NbtTagType.cs b/fNbt/NbtTagType.cs index 91d473d..e59966b 100644 --- a/fNbt/NbtTagType.cs +++ b/fNbt/NbtTagType.cs @@ -38,6 +38,9 @@ public enum NbtTagType : byte { Compound = 0x0a, /// TAG_Byte_Array: A length-prefixed array of signed 32-bit integers. - IntArray = 0x0b - } + IntArray = 0x0b, + + /// TAG_Long_Array: A length-prefixed array of signed 64-bit integers. + LongArray = 12 + } } diff --git a/fNbt/Tags/NbtCompound.cs b/fNbt/Tags/NbtCompound.cs index c996698..7adaba7 100644 --- a/fNbt/Tags/NbtCompound.cs +++ b/fNbt/Tags/NbtCompound.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Text; +using fNbt.Tags; using JetBrains.Annotations; namespace fNbt { @@ -291,6 +292,10 @@ internal override bool ReadTag(NbtBinaryReader readStream) { newTag = new NbtIntArray(); break; + case NbtTagType.LongArray: + newTag = new NbtLongArray(); + break; + default: throw new NbtFormatException("Unsupported tag type found in NBT_Compound: " + nextTag); } @@ -358,6 +363,10 @@ internal override void SkipTag(NbtBinaryReader readStream) { newTag = new NbtIntArray(); break; + case NbtTagType.LongArray: + newTag = new NbtLongArray(); + break; + default: throw new NbtFormatException("Unsupported tag type found in NBT_Compound: " + nextTag); } diff --git a/fNbt/Tags/NbtLongArray.cs b/fNbt/Tags/NbtLongArray.cs new file mode 100644 index 0000000..1f27279 --- /dev/null +++ b/fNbt/Tags/NbtLongArray.cs @@ -0,0 +1,172 @@ +using System; +using System.Collections.Generic; +using System.Text; +using JetBrains.Annotations; + +namespace fNbt.Tags +{ + // A tag containing an array of signed 64-bit integers. + public sealed class NbtLongArray : NbtTag + { + static readonly long[] ZeroArray = new long[0]; + + /// Type of this tag (ByteArray). + public override NbtTagType TagType + { + get { return NbtTagType.LongArray; } + } + + /// Value/payload of this tag (an array of signed 32-bit integers). Value is stored as-is and is NOT cloned. May not be null. + /// is null. + [NotNull] + public long[] Value + { + get { return ints; } + set + { + if (value == null) + { + throw new ArgumentNullException("value"); + } + ints = value; + } + } + + [NotNull] + long[] ints; + + + /// Creates an unnamed NbtIntArray tag, containing an empty array of ints. + public NbtLongArray() + : this((string)null) { } + + + /// Creates an unnamed NbtIntArray tag, containing the given array of ints. + /// Int array to assign to this tag's Value. May not be null. + /// is null. + /// Given int array will be cloned. To avoid unnecessary copying, call one of the other constructor + /// overloads (that do not take a int[]) and then set the Value property yourself. + public NbtLongArray([NotNull] long[] value) + : this(null, value) { } + + + /// Creates an NbtIntArray tag with the given name, containing an empty array of ints. + /// Name to assign to this tag. May be null. + public NbtLongArray([CanBeNull] string tagName) + { + name = tagName; + ints = ZeroArray; + } + + + /// Creates an NbtIntArray tag with the given name, containing the given array of ints. + /// Name to assign to this tag. May be null. + /// Int array to assign to this tag's Value. May not be null. + /// is null. + /// Given int array will be cloned. To avoid unnecessary copying, call one of the other constructor + /// overloads (that do not take a int[]) and then set the Value property yourself. + public NbtLongArray([CanBeNull] string tagName, [NotNull] long[] value) + { + if (value == null) throw new ArgumentNullException("value"); + name = tagName; + ints = (long[])value.Clone(); + } + + + /// Creates a deep copy of given NbtIntArray. + /// Tag to copy. May not be null. + /// is null. + /// Int array of given tag will be cloned. + public NbtLongArray([NotNull] NbtLongArray other) + { + if (other == null) throw new ArgumentNullException("other"); + name = other.name; + ints = (long[])other.Value.Clone(); + } + + + /// Gets or sets an integer at the given index. + /// The zero-based index of the element to get or set. + /// The integer at the specified index. + /// is outside the array bounds. + public new long this[int tagIndex] + { + get { return Value[tagIndex]; } + set { Value[tagIndex] = value; } + } + + + internal override bool ReadTag(NbtBinaryReader readStream) + { + int length = readStream.ReadInt32(); + if (length < 0) + { + throw new NbtFormatException("Negative length given in Tag_long_array"); + } + + if (readStream.Selector != null && !readStream.Selector(this)) + { + readStream.Skip(length * sizeof(int)); + return false; + } + + Value = new long[length]; + for (int i = 0; i < length; i++) + { + Value[i] = readStream.ReadInt64(); + } + return true; + } + + + internal override void SkipTag(NbtBinaryReader readStream) + { + int length = readStream.ReadInt32(); + if (length < 0) + { + throw new NbtFormatException("Negative length given in TAG_Long_Array"); + } + readStream.Skip(length * sizeof(long)); + } + + + internal override void WriteTag(NbtBinaryWriter writeStream) + { + writeStream.Write(NbtTagType.LongArray); + if (Name == null) throw new NbtFormatException("Name is null"); + writeStream.Write(Name); + WriteData(writeStream); + } + + + internal override void WriteData(NbtBinaryWriter writeStream) + { + writeStream.Write(Value.Length); + for (int i = 0; i < Value.Length; i++) + { + writeStream.Write(Value[i]); + } + } + + + public override object Clone() + { + return new NbtLongArray(this); + } + + + internal override void PrettyPrint(StringBuilder sb, string indentString, int indentLevel) + { + for (int i = 0; i < indentLevel; i++) + { + sb.Append(indentString); + } + sb.Append("TAG_Long_Array"); + if (!String.IsNullOrEmpty(Name)) + { + sb.AppendFormat("(\"{0}\")", Name); + } + sb.AppendFormat(": [{0} longs]", ints.Length); + } + } +} diff --git a/fNbt/Tags/NbtTag.cs b/fNbt/Tags/NbtTag.cs index c591869..5ed30e1 100644 --- a/fNbt/Tags/NbtTag.cs +++ b/fNbt/Tags/NbtTag.cs @@ -1,6 +1,7 @@ using System; using System.Globalization; using System.Text; +using fNbt.Tags; using JetBrains.Annotations; namespace fNbt { @@ -251,9 +252,24 @@ public int[] IntArrayValue { throw new InvalidCastException("Cannot get IntArrayValue from " + GetCanonicalTagName(TagType)); } } - } - - /// Returns the value of this tag, cast as a string. + } + + /// Returns the value of this tag, cast as an long array. + /// Only supported by NbtLongArray tags. + /// When used on a tag other than NbtLongArray. + public long[] LongArrayValue + { + get + { + if (TagType == NbtTagType.LongArray) { + return ((NbtLongArray)this).Value; + } else { + throw new InvalidCastException("Cannot get LongArrayValue from " + GetCanonicalTagName(TagType)); + } + } + } + + /// Returns the value of this tag, cast as a string. /// Returns exact value for NbtString, and stringified (using InvariantCulture) value for NbtByte, NbtDouble, NbtFloat, NbtInt, NbtLong, and NbtShort. /// Not supported by NbtCompound, NbtList, NbtByteArray, or NbtIntArray. /// When used on an unsupported tag. @@ -307,6 +323,8 @@ public static string GetCanonicalTagName(NbtTagType type) { return "TAG_Int"; case NbtTagType.IntArray: return "TAG_Int_Array"; + case NbtTagType.LongArray: + return "TAG_Long_Array"; case NbtTagType.List: return "TAG_List"; case NbtTagType.Long: From 26c3f7c67dc56a7f72e30e891173542ad9ad07d5 Mon Sep 17 00:00:00 2001 From: Niclas Olofsson Date: Tue, 31 Dec 2019 19:37:38 +0100 Subject: [PATCH 12/16] Allow read of non-compound root tags --- fNbt.sln.DotSettings | 1 + fNbt/NbtFile.cs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fNbt.sln.DotSettings b/fNbt.sln.DotSettings index de2d953..94a550e 100644 --- a/fNbt.sln.DotSettings +++ b/fNbt.sln.DotSettings @@ -169,6 +169,7 @@ True True True + True True True True diff --git a/fNbt/NbtFile.cs b/fNbt/NbtFile.cs index 3a38c0f..85b8e3d 100644 --- a/fNbt/NbtFile.cs +++ b/fNbt/NbtFile.cs @@ -19,6 +19,7 @@ public sealed class NbtFile { public string FileName { get; private set; } public bool UseVarInt { get; set; } + public bool AllowNonCompoundRootTag { get; set; } /// Gets the compression method used for most recent loading/saving of this file. /// Defaults to AutoDetect. @@ -347,7 +348,7 @@ void LoadFromStreamInternal([NotNull] Stream stream, [CanBeNull] TagSelector tag if (firstByte < 0) { throw new EndOfStreamException(); } - if (firstByte != (int)NbtTagType.Compound) { + if (!AllowNonCompoundRootTag && firstByte != (int)NbtTagType.Compound) { throw new NbtFormatException("Given NBT stream does not start with a TAG_Compound"); } var reader = new NbtBinaryReader(stream, BigEndian) { From d0e6e5d6b626bcb573233ba1d68455fca2517839 Mon Sep 17 00:00:00 2001 From: Niclas Olofsson Date: Tue, 31 Dec 2019 22:36:09 +0100 Subject: [PATCH 13/16] Fix reading of any TAG type as root. Not a proper solution, but works for now. --- fNbt/NbtFile.cs | 62 +++++++++++++++++++++++++++++++--------- fNbt/Tags/NbtCompound.cs | 3 ++ 2 files changed, 51 insertions(+), 14 deletions(-) diff --git a/fNbt/NbtFile.cs b/fNbt/NbtFile.cs index 85b8e3d..fedb148 100644 --- a/fNbt/NbtFile.cs +++ b/fNbt/NbtFile.cs @@ -2,6 +2,7 @@ using System.Diagnostics; using System.IO; using System.IO.Compression; +using System.Linq; using JetBrains.Annotations; namespace fNbt { @@ -19,7 +20,6 @@ public sealed class NbtFile { public string FileName { get; private set; } public bool UseVarInt { get; set; } - public bool AllowNonCompoundRootTag { get; set; } /// Gets the compression method used for most recent loading/saving of this file. /// Defaults to AutoDetect. @@ -40,6 +40,21 @@ public NbtCompound RootTag { [NotNull] NbtCompound rootTag; + /// ALTERNATIVE Root tag of this file. Must be a named Tag. Defaults to an empty-named tag. + /// If given tag is unnamed. + [NotNull] + public NbtTag AlternativeRootTag + { + get { return rootTag; } + set + { + if (value == null) throw new ArgumentNullException("value"); + if (value.Name == null) throw new ArgumentException("Root tag must be named."); + alternativeRootTag = value; + } + } + NbtTag alternativeRootTag; + /// Whether new NbtFiles should default to big-endian encoding (default: true). public static bool BigEndianByDefault { get; set; } @@ -342,23 +357,42 @@ static NbtCompression DetectCompression([NotNull] Stream stream) { } - void LoadFromStreamInternal([NotNull] Stream stream, [CanBeNull] TagSelector tagSelector) { - // Make sure the first byte in this file is the tag for a TAG_Compound - int firstByte = stream.ReadByte(); - if (firstByte < 0) { - throw new EndOfStreamException(); - } - if (!AllowNonCompoundRootTag && firstByte != (int)NbtTagType.Compound) { - throw new NbtFormatException("Given NBT stream does not start with a TAG_Compound"); - } + public bool AllowAlternativeRootTag { get; set; } = false; + + private void LoadFromStreamInternal([NotNull] Stream stream, [CanBeNull] TagSelector tagSelector) { var reader = new NbtBinaryReader(stream, BigEndian) { Selector = tagSelector, - UseVarInt = UseVarInt + UseVarInt = UseVarInt }; - var rootCompound = new NbtCompound(reader.ReadString()); - rootCompound.ReadTag(reader); - RootTag = rootCompound; + if (AllowAlternativeRootTag) { + var rootCompound = new NbtCompound("fakeroot"); + rootCompound.ReadTag(reader); + NbtTag nbtTag = rootCompound.Tags.First(); + if(nbtTag is NbtCompound) { + RootTag = (NbtCompound)nbtTag; + } else { + RootTag = rootCompound; + AlternativeRootTag = nbtTag; + } + } + else { + // Make sure the first byte in this file is the tag for a TAG_Compound + int firstByte = stream.ReadByte(); + if (firstByte < 0) + { + throw new EndOfStreamException(); + } + if (firstByte != (int)NbtTagType.Compound) + { + throw new NbtFormatException("Given NBT stream does not start with a TAG_Compound"); + } + + var rootCompound = new NbtCompound(reader.ReadString()); + rootCompound.ReadTag(reader); + RootTag = rootCompound; + } + } #endregion diff --git a/fNbt/Tags/NbtCompound.cs b/fNbt/Tags/NbtCompound.cs index 7adaba7..0e73f88 100644 --- a/fNbt/Tags/NbtCompound.cs +++ b/fNbt/Tags/NbtCompound.cs @@ -305,6 +305,9 @@ internal override bool ReadTag(NbtBinaryReader readStream) { // ReSharper disable AssignNullToNotNullAttribute // newTag.Name is never null tags.Add(newTag.Name, newTag); + if ("fakeroot".Equals(name) && Parent == null) { + return true; + } // ReSharper restore AssignNullToNotNullAttribute } } From 6c78bf93e61c6ff37c2c981135672a525025b306 Mon Sep 17 00:00:00 2001 From: Niclas Olofsson Date: Wed, 1 Jan 2020 01:42:35 +0100 Subject: [PATCH 14/16] Return alternative root tag, not the root. --- fNbt/NbtFile.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fNbt/NbtFile.cs b/fNbt/NbtFile.cs index fedb148..7f7476a 100644 --- a/fNbt/NbtFile.cs +++ b/fNbt/NbtFile.cs @@ -45,7 +45,7 @@ public NbtCompound RootTag { [NotNull] public NbtTag AlternativeRootTag { - get { return rootTag; } + get { return alternativeRootTag; } set { if (value == null) throw new ArgumentNullException("value"); From 75c75254a5422eebacd41d0833b563609f06de5e Mon Sep 17 00:00:00 2001 From: Niclas Olofsson Date: Wed, 1 Jan 2020 22:53:06 +0100 Subject: [PATCH 15/16] Proper implementation of reading compound OR list tags as root. Can easily be extended by commenting out the switch labels in NbtTag. But for now, just lists. --- fNbt.Test/ListTests.cs | 18 +++++---- fNbt.Test/NbtWriterTest.cs | 3 +- fNbt.Test/TagSelectorTests.cs | 27 +++++++++----- fNbt.Test/TestFiles.cs | 6 +-- fNbt/NbtFile.cs | 65 ++++++++++----------------------- fNbt/Tags/NbtCompound.cs | 3 -- fNbt/Tags/NbtTag.cs | 69 +++++++++++++++++++++++++++++++++++ 7 files changed, 122 insertions(+), 69 deletions(-) diff --git a/fNbt.Test/ListTests.cs b/fNbt.Test/ListTests.cs index 6ebd13f..2203aa9 100644 --- a/fNbt.Test/ListTests.cs +++ b/fNbt.Test/ListTests.cs @@ -287,7 +287,9 @@ public void Serializing1() { for (int i = 0; i < elements; i++) { writtenList.Add(new NbtInt(i)); } - writtenFile.RootTag.Add(writtenList); + + NbtCompound rootTag = (NbtCompound)writtenFile.RootTag; + rootTag.Add(writtenList); // test saving byte[] data = writtenFile.SaveToBuffer(NbtCompression.None); @@ -338,11 +340,12 @@ public void SerializingEmpty() { testFile.LoadFromBuffer(buffer, 0, buffer.Length, NbtCompression.None); - NbtList list1 = testFile.RootTag.Get("emptyList"); + NbtCompound testFileRootTag = (NbtCompound)testFile.RootTag; + NbtList list1 = testFileRootTag.Get("emptyList"); Assert.AreEqual(list1.Count,0); Assert.AreEqual(list1.ListType, NbtTagType.End); - NbtList list2 = testFile.RootTag.Get("listyList"); + NbtList list2 = testFileRootTag.Get("listyList"); Assert.AreEqual(list2.Count,1); Assert.AreEqual(list2.ListType, NbtTagType.List); Assert.AreEqual(list2.Get(0).Count, 0); @@ -372,15 +375,16 @@ public void NestedListAndCompoundTest() { var file = new NbtFile(); long bytesRead = file.LoadFromBuffer(data, 0, data.Length, NbtCompression.None); Assert.AreEqual(bytesRead, data.Length); - Assert.AreEqual(1, file.RootTag.Get("OuterList").Count); - Assert.AreEqual(null, file.RootTag.Get("OuterList").Get(0).Name); + NbtCompound rootTag = (NbtCompound)file.RootTag; + Assert.AreEqual(1, rootTag.Get("OuterList").Count); + Assert.AreEqual(null, rootTag.Get("OuterList").Get(0).Name); Assert.AreEqual(1, - file.RootTag.Get("OuterList") + rootTag.Get("OuterList") .Get(0) .Get("InnerList") .Count); Assert.AreEqual(null, - file.RootTag.Get("OuterList") + rootTag.Get("OuterList") .Get(0) .Get("InnerList") .Get(0) diff --git a/fNbt.Test/NbtWriterTest.cs b/fNbt.Test/NbtWriterTest.cs index 6c23c26..e819f70 100644 --- a/fNbt.Test/NbtWriterTest.cs +++ b/fNbt.Test/NbtWriterTest.cs @@ -445,8 +445,9 @@ public void ComplexStringsTest() { // Let's read what we have written, and check contents NbtFile file = new NbtFile(); file.LoadFromStream(ms, NbtCompression.None); + NbtCompound rootTag = (NbtCompound)file.RootTag; var readStrings = - file.RootTag.Get("stringList") + rootTag.Get("stringList") .ToArray() .Select(tag => tag.StringValue); diff --git a/fNbt.Test/TagSelectorTests.cs b/fNbt.Test/TagSelectorTests.cs index dd6428f..53598b4 100644 --- a/fNbt.Test/TagSelectorTests.cs +++ b/fNbt.Test/TagSelectorTests.cs @@ -9,25 +9,29 @@ public void SkippingTagsOnFileLoad() { loadedFile.LoadFromFile("TestFiles/bigtest.nbt", NbtCompression.None, tag => tag.Name != "nested compound test"); - Assert.IsFalse(loadedFile.RootTag.Contains("nested compound test")); - Assert.IsTrue(loadedFile.RootTag.Contains("listTest (long)")); + NbtCompound rootTag = (NbtCompound)loadedFile.RootTag; + Assert.IsFalse(rootTag.Contains("nested compound test")); + Assert.IsTrue(rootTag.Contains("listTest (long)")); loadedFile.LoadFromFile("TestFiles/bigtest.nbt", NbtCompression.None, tag => tag.TagType != NbtTagType.Float || tag.Parent.Name != "Level"); - Assert.IsFalse(loadedFile.RootTag.Contains("floatTest")); - Assert.AreEqual(0.75f, loadedFile.RootTag["nested compound test"]["ham"]["value"].FloatValue); + rootTag = (NbtCompound)loadedFile.RootTag; + Assert.IsFalse(rootTag.Contains("floatTest")); + Assert.AreEqual(0.75f, rootTag["nested compound test"]["ham"]["value"].FloatValue); loadedFile.LoadFromFile("TestFiles/bigtest.nbt", NbtCompression.None, tag => tag.Name != "listTest (long)"); - Assert.IsFalse(loadedFile.RootTag.Contains("listTest (long)")); - Assert.IsTrue(loadedFile.RootTag.Contains("byteTest")); + rootTag = (NbtCompound)loadedFile.RootTag; + Assert.IsFalse(rootTag.Contains("listTest (long)")); + Assert.IsTrue(rootTag.Contains("byteTest")); loadedFile.LoadFromFile("TestFiles/bigtest.nbt", NbtCompression.None, tag => false); - Assert.AreEqual(0, loadedFile.RootTag.Count); + rootTag = (NbtCompound)loadedFile.RootTag; + Assert.AreEqual(0, rootTag.Count); } @@ -38,7 +42,8 @@ public void SkippingLists() { byte[] savedFile = file.SaveToBuffer(NbtCompression.None); file.LoadFromBuffer(savedFile, 0, savedFile.Length, NbtCompression.None, tag => tag.TagType != NbtTagType.List); - Assert.AreEqual(0, file.RootTag.Count); + NbtCompound rootTag = (NbtCompound)file.RootTag; + Assert.AreEqual(0, rootTag.Count); } { // Check list-compound interaction @@ -55,7 +60,8 @@ public void SkippingLists() { byte[] savedFile = file.SaveToBuffer(NbtCompression.None); file.LoadFromBuffer(savedFile, 0, savedFile.Length, NbtCompression.None, tag => tag.TagType != NbtTagType.List); - Assert.AreEqual(1, file.RootTag.Count); + NbtCompound rootTag = (NbtCompound)file.RootTag; + Assert.AreEqual(1, rootTag.Count); } } @@ -70,7 +76,8 @@ public void SkippingValuesInCompoundTest() { var file = new NbtFile(root); byte[] savedFile = file.SaveToBuffer(NbtCompression.None); file.LoadFromBuffer(savedFile, 0, savedFile.Length, NbtCompression.None, tag => false); - Assert.AreEqual(0, file.RootTag.Count); + NbtCompound rootTag = (NbtCompound)file.RootTag; + Assert.AreEqual(0, rootTag.Count); } } } diff --git a/fNbt.Test/TestFiles.cs b/fNbt.Test/TestFiles.cs index a98be3b..441a79b 100644 --- a/fNbt.Test/TestFiles.cs +++ b/fNbt.Test/TestFiles.cs @@ -134,7 +134,7 @@ public static void AssertNbtSmallFile(NbtFile file) { // See TestFiles/test.nbt.txt to see the expected format Assert.IsInstanceOf(file.RootTag); - NbtCompound root = file.RootTag; + NbtCompound root = (NbtCompound)file.RootTag; Assert.AreEqual("hello world", root.Name); Assert.AreEqual(1, root.Count); @@ -150,7 +150,7 @@ public static void AssertNbtBigFile(NbtFile file) { // See TestFiles/bigtest.nbt.txt to see the expected format Assert.IsInstanceOf(file.RootTag); - NbtCompound root = file.RootTag; + NbtCompound root = (NbtCompound)file.RootTag; Assert.AreEqual("Level", root.Name); Assert.AreEqual(12, root.Count); @@ -314,7 +314,7 @@ public static NbtCompound MakeValueTest() { public static void AssertValueTest(NbtFile file) { Assert.IsInstanceOf(file.RootTag); - NbtCompound root = file.RootTag; + NbtCompound root = (NbtCompound)file.RootTag; Assert.AreEqual("root", root.Name); Assert.AreEqual(9, root.Count); diff --git a/fNbt/NbtFile.cs b/fNbt/NbtFile.cs index 7f7476a..9f80391 100644 --- a/fNbt/NbtFile.cs +++ b/fNbt/NbtFile.cs @@ -28,7 +28,7 @@ public sealed class NbtFile { /// Root tag of this file. Must be a named CompoundTag. Defaults to an empty-named tag. /// If given tag is unnamed. [NotNull] - public NbtCompound RootTag { + public NbtTag RootTag { get { return rootTag; } set { if (value == null) throw new ArgumentNullException("value"); @@ -38,22 +38,7 @@ public NbtCompound RootTag { } [NotNull] - NbtCompound rootTag; - - /// ALTERNATIVE Root tag of this file. Must be a named Tag. Defaults to an empty-named tag. - /// If given tag is unnamed. - [NotNull] - public NbtTag AlternativeRootTag - { - get { return alternativeRootTag; } - set - { - if (value == null) throw new ArgumentNullException("value"); - if (value.Name == null) throw new ArgumentException("Root tag must be named."); - alternativeRootTag = value; - } - } - NbtTag alternativeRootTag; + NbtTag rootTag; /// Whether new NbtFiles should default to big-endian encoding (default: true). public static bool BigEndianByDefault { get; set; } @@ -357,7 +342,7 @@ static NbtCompression DetectCompression([NotNull] Stream stream) { } - public bool AllowAlternativeRootTag { get; set; } = false; + public bool AllowAlternativeRootTag { get; set; } = true; private void LoadFromStreamInternal([NotNull] Stream stream, [CanBeNull] TagSelector tagSelector) { var reader = new NbtBinaryReader(stream, BigEndian) { @@ -365,33 +350,23 @@ private void LoadFromStreamInternal([NotNull] Stream stream, [CanBeNull] TagSele UseVarInt = UseVarInt }; - if (AllowAlternativeRootTag) { - var rootCompound = new NbtCompound("fakeroot"); - rootCompound.ReadTag(reader); - NbtTag nbtTag = rootCompound.Tags.First(); - if(nbtTag is NbtCompound) { - RootTag = (NbtCompound)nbtTag; - } else { - RootTag = rootCompound; - AlternativeRootTag = nbtTag; - } - } - else { - // Make sure the first byte in this file is the tag for a TAG_Compound - int firstByte = stream.ReadByte(); - if (firstByte < 0) - { - throw new EndOfStreamException(); - } - if (firstByte != (int)NbtTagType.Compound) - { - throw new NbtFormatException("Given NBT stream does not start with a TAG_Compound"); - } - - var rootCompound = new NbtCompound(reader.ReadString()); - rootCompound.ReadTag(reader); - RootTag = rootCompound; - } + RootTag = NbtTag.ReadUnknownTag(reader); + //else { + // // Make sure the first byte in this file is the tag for a TAG_Compound + // int firstByte = stream.ReadByte(); + // if (firstByte < 0) + // { + // throw new EndOfStreamException(); + // } + // if (firstByte != (int)NbtTagType.Compound) + // { + // throw new NbtFormatException("Given NBT stream does not start with a TAG_Compound"); + // } + + // var rootCompound = new NbtCompound(reader.ReadString()); + // rootCompound.ReadTag(reader); + // RootTag = rootCompound; + //} } diff --git a/fNbt/Tags/NbtCompound.cs b/fNbt/Tags/NbtCompound.cs index 0e73f88..7adaba7 100644 --- a/fNbt/Tags/NbtCompound.cs +++ b/fNbt/Tags/NbtCompound.cs @@ -305,9 +305,6 @@ internal override bool ReadTag(NbtBinaryReader readStream) { // ReSharper disable AssignNullToNotNullAttribute // newTag.Name is never null tags.Add(newTag.Name, newTag); - if ("fakeroot".Equals(name) && Parent == null) { - return true; - } // ReSharper restore AssignNullToNotNullAttribute } } diff --git a/fNbt/Tags/NbtTag.cs b/fNbt/Tags/NbtTag.cs index 5ed30e1..299ac2f 100644 --- a/fNbt/Tags/NbtTag.cs +++ b/fNbt/Tags/NbtTag.cs @@ -1,5 +1,6 @@ using System; using System.Globalization; +using System.IO; using System.Text; using fNbt.Tags; using JetBrains.Annotations; @@ -379,6 +380,74 @@ public static string DefaultIndentString { } } + internal static NbtTag ReadUnknownTag(NbtBinaryReader readStream) + { + NbtTagType nextTag = readStream.ReadTagType(); + NbtTag newTag; + switch (nextTag) { + case NbtTagType.End: + throw new EndOfStreamException(); + + //case NbtTagType.Byte: + // newTag = new NbtByte(); + // break; + + //case NbtTagType.Short: + // newTag = new NbtShort(); + // break; + + //case NbtTagType.Int: + // newTag = new NbtInt(); + // break; + + //case NbtTagType.Long: + // newTag = new NbtLong(); + // break; + + //case NbtTagType.Float: + // newTag = new NbtFloat(); + // break; + + //case NbtTagType.Double: + // newTag = new NbtDouble(); + // break; + + //case NbtTagType.ByteArray: + // newTag = new NbtByteArray(); + // break; + + //case NbtTagType.String: + // newTag = new NbtString(); + // break; + + case NbtTagType.List: + newTag = new NbtList(); + break; + + case NbtTagType.Compound: + newTag = new NbtCompound(); + break; + + //case NbtTagType.IntArray: + // newTag = new NbtIntArray(); + // break; + + //case NbtTagType.LongArray: + // newTag = new NbtLongArray(); + // break; + + default: + throw new NbtFormatException("Unsupported tag type found in NBT_Tag: " + nextTag); + } + + newTag.Name = readStream.ReadString(); + if (newTag.ReadTag(readStream)) { + return newTag; + } + + throw new NbtFormatException("Given NBT stream does not start with a proper TAG"); + } + static string defaultIndentString = " "; } } From 4c09f43a18cf849459e41080dfd2f7d6d014f011 Mon Sep 17 00:00:00 2001 From: Kenny van Vulpen Date: Tue, 29 Mar 2022 18:51:58 +0200 Subject: [PATCH 16/16] Update dependencies & target framework. --- Dependencies/nunit.framework.dll | Bin 151552 -> 0 bytes Dependencies/nunit.framework.xml | 10960 ---------------- .../DynamicConverterTests.cs | 7 +- .../Properties/AssemblyInfo.cs | 36 - .../fNbt.Serialization.Test.csproj | 89 +- fNbt.Serialization/Properties/AssemblyInfo.cs | 36 - fNbt.Serialization/fNbt.Serialization.csproj | 118 +- fNbt.Test/NbtSerializerTests.cs | 208 + fNbt.Test/fNbt.Test.csproj | 10 +- fNbt.sln | 31 +- fNbt.sln.DotSettings | 4 + fNbt/Serialization/NbtPropertyAttribute.cs | 17 + fNbt/Serialization/NbtSerializer.cs | 329 + fNbt/Tags/NbtCompound.cs | 13 +- fNbt/Tags/NbtList.cs | 11 +- fNbt/fNbt.csproj | 9 +- 16 files changed, 683 insertions(+), 11195 deletions(-) delete mode 100644 Dependencies/nunit.framework.dll delete mode 100644 Dependencies/nunit.framework.xml delete mode 100644 fNbt.Serialization.Test/Properties/AssemblyInfo.cs delete mode 100644 fNbt.Serialization/Properties/AssemblyInfo.cs create mode 100644 fNbt.Test/NbtSerializerTests.cs create mode 100644 fNbt/Serialization/NbtPropertyAttribute.cs create mode 100644 fNbt/Serialization/NbtSerializer.cs diff --git a/Dependencies/nunit.framework.dll b/Dependencies/nunit.framework.dll deleted file mode 100644 index 780727f219d08aa635e12a56a326850ef82dbec5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 151552 zcmeEvd4OD1vG?hFZ!gocWF|A2$wD%d{W3k11wtGWS&Xvp5MvSogb=m}bnH$L(oPJr zh!~Jf6a<6_2!bFA0*VNV;DQ)Y5S2F|PknAE?w|~(X@v#?jM+wF3gw)!A8NMJ(yZY z;D}H2uQ*}-PRIP@^V`pk?L6(k@0a#>f3bOo+jrUUdH05I3>|%D!-THOANb>_k6fQy@yXYw zy|-zPFaF`cz0UgWCBJ#{s4J&;A2;LSZ(s1h#qYoHt`kq4cSqls|8)QEuN-{o`csyf zb9)`X&6pze>)pvzGRCZ}wgcV(;MfpAY&+)A1Na3+n{hf`&2+w+DdzecHgzdKVaB48VU|{u816#-w}&|84nC zhVomI@)i8Iv zrC5a7^OJGBd_J&51 zG%%`eE1rCW=Ln!ci^08pI9r95{T_05%MKH3>CEcvG z6Vjb9$1_};f+B6Eqv-nQ!~SRn?b)_$|8Bn%_Md^CG-v36AHFY0t&|n;x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HZv&hQh?3pamax@z55vq73N_N|9E385R2X7iPTfAkN5 zLG)?QAdDwtpCQU_%D7!4BfrK!|J|JiAOCR046oYpi!tjXD|{Kt^=DjB}tv7m4<+FSgsZn`&q;jHm`9gi| z!d;c)^||xa+G6F%NM+{o%3YQ5#oCoxy)r&hd1!^7YF}@xT-vU`QN|q|tDHK|H-uIz zN7kzKb5uj6tk?(F8Wlbtre95(=aL_Sd!NmsQg2kM6+T4aznWB8S*WBY%NfmVA#5i5*B)N0uJTh;t?w7u7e^ZzH+65;>M2-OywXaxMZT1( zmlW{z$+e@4i^uuCga5t4T5V)rdO3go=k2a?*kU`u4hD8Gu!Dge4D4Xw{~iW1j+;O3 z1E>S-FnDJJFP(JctKNhBf8=o1z0|Fg|MOD!JwzUI)9wu61TW`L^K!yTUOG9$^MpG_ zTz|gX{h$Ab+(5nf0sidnuGaI{trV|1&qVtA%%eOq^s1}f$G9=88^pTRq#L~Y^AT&M zV+vi>=4QKdw8t&do} z8EUOq`8c_H4MH#3RQR-jdU=R4UCb8_^@71Aa^D|(qhY?IHs4c>E6UXRYGh$s*z>(< zWI=S=@`O>%!{5r$YWvSmpxaXGLv3r}sah`t>eUF%6!$ZK5}MPUa({PTchfa)y0(8E zP1w?_Pr7|RVlx(vo-+D5NgF|`*B!L_k!D-3p}cQ8x{KYMp;zH^9@^7e$lLD|=MEXo zx7XcD`8T5b!`613S?eaeUc&LOB);GFhQOU*2Ln48*ulUK26iy8gMl3k>|kIA1OGo@ zU^I*NjA76B6nFmYU|FtCGx9SrPXU - - - nunit.framework - - - - - The different targets a test action attribute can be applied to - - - - - Default target, which is determined by where the action attribute is attached - - - - - Target a individual test case - - - - - Target a suite of test cases - - - - - Delegate used by tests that execute code and - capture any thrown exception. - - - - - The Assert class contains a collection of static methods that - implement the most common assertions used in NUnit. - - - - - We don't actually want any instances of this object, but some people - like to inherit from it to add other static methods. Hence, the - protected constructor disallows any instances of this object. - - - - - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. - - - - - - - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. - - - - - - - Throws a with the message and arguments - that are passed in. This allows a test to be cut short, with a result - of success returned to NUnit. - - The message to initialize the with. - Arguments to be used in formatting the message - - - - Throws a with the message and arguments - that are passed in. This allows a test to be cut short, with a result - of success returned to NUnit. - - The message to initialize the with. - - - - Throws a with the message and arguments - that are passed in. This allows a test to be cut short, with a result - of success returned to NUnit. - - - - - Throws an with the message and arguments - that are passed in. This is used by the other Assert functions. - - The message to initialize the with. - Arguments to be used in formatting the message - - - - Throws an with the message that is - passed in. This is used by the other Assert functions. - - The message to initialize the with. - - - - Throws an . - This is used by the other Assert functions. - - - - - Throws an with the message and arguments - that are passed in. This causes the test to be reported as ignored. - - The message to initialize the with. - Arguments to be used in formatting the message - - - - Throws an with the message that is - passed in. This causes the test to be reported as ignored. - - The message to initialize the with. - - - - Throws an . - This causes the test to be reported as ignored. - - - - - Throws an with the message and arguments - that are passed in. This causes the test to be reported as inconclusive. - - The message to initialize the with. - Arguments to be used in formatting the message - - - - Throws an with the message that is - passed in. This causes the test to be reported as inconclusive. - - The message to initialize the with. - - - - Throws an . - This causes the test to be reported as Inconclusive. - - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - The actual value to test - A Constraint to be applied - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - The actual value to test - A Constraint to be applied - The message that will be displayed on failure - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - The actual value to test - A Constraint expression to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display if the condition is false - Arguments to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display if the condition is false - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - An ActualValueDelegate returning the value to be tested - A Constraint expression to be applied - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - An ActualValueDelegate returning the value to be tested - A Constraint expression to be applied - The message that will be displayed on failure - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - An ActualValueDelegate returning the value to be tested - A Constraint expression to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - The actual value to test - A Constraint to be applied - - - - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - The actual value to test - A Constraint to be applied - The message that will be displayed on failure - - - - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - The actual value to test - A Constraint to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that the code represented by a delegate throws an exception - that satisfies the constraint provided. - - A TestDelegate to be executed - A ThrowsConstraint used in the test - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - Used as a synonym for That in rare cases where a private setter - causes a Visual Basic compilation error. - - The actual value to test - A Constraint to be applied - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - Used as a synonym for That in rare cases where a private setter - causes a Visual Basic compilation error. - - The actual value to test - A Constraint to be applied - The message that will be displayed on failure - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - Used as a synonym for That in rare cases where a private setter - causes a Visual Basic compilation error. - - - This method is provided for use by VB developers needing to test - the value of properties with private setters. - - The actual value to test - A Constraint expression to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate throws a particular exception when called. - - A constraint to be satisfied by the exception - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate throws a particular exception when called. - - A constraint to be satisfied by the exception - A TestDelegate - The message that will be displayed on failure - - - - Verifies that a delegate throws a particular exception when called. - - A constraint to be satisfied by the exception - A TestDelegate - - - - Verifies that a delegate throws a particular exception when called. - - The exception Type expected - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate throws a particular exception when called. - - The exception Type expected - A TestDelegate - The message that will be displayed on failure - - - - Verifies that a delegate throws a particular exception when called. - - The exception Type expected - A TestDelegate - - - - Verifies that a delegate throws a particular exception when called. - - Type of the expected exception - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate throws a particular exception when called. - - Type of the expected exception - A TestDelegate - The message that will be displayed on failure - - - - Verifies that a delegate throws a particular exception when called. - - Type of the expected exception - A TestDelegate - - - - Verifies that a delegate throws an exception when called - and returns it. - - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate throws an exception when called - and returns it. - - A TestDelegate - The message that will be displayed on failure - - - - Verifies that a delegate throws an exception when called - and returns it. - - A TestDelegate - - - - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. - - The expected Exception Type - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. - - The expected Exception Type - A TestDelegate - The message that will be displayed on failure - - - - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. - - The expected Exception Type - A TestDelegate - - - - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. - - The expected Exception Type - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. - - The expected Exception Type - A TestDelegate - The message that will be displayed on failure - - - - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. - - The expected Exception Type - A TestDelegate - - - - Verifies that a delegate does not throw an exception - - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate does not throw an exception. - - A TestDelegate - The message that will be displayed on failure - - - - Verifies that a delegate does not throw an exception. - - A TestDelegate - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display in case of failure - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display in case of failure - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - - - - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - The message to display in case of failure - - - - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - - - - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - The message to display in case of failure - - - - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - - - - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. - - The object that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. - - The object that is to be tested - The message to display in case of failure - - - - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. - - The object that is to be tested - - - - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. - - The object that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. - - The object that is to be tested - The message to display in case of failure - - - - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. - - The object that is to be tested - - - - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. - - The object that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. - - The object that is to be tested - The message to display in case of failure - - - - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. - - The object that is to be tested - - - - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. - - The object that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. - - The object that is to be tested - The message to display in case of failure - - - - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. - - The object that is to be tested - - - - Verifies that two ints are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two ints are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two ints are equal. If they are not, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two longs are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two longs are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two longs are equal. If they are not, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two unsigned ints are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two unsigned ints are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two unsigned ints are equal. If they are not, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two unsigned longs are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two unsigned longs are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two unsigned longs are equal. If they are not, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two decimals are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two decimals are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two decimals are equal. If they are not, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. - - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. - - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - The message to display in case of failure - - - - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. - - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - - - - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. - - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. - - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - The message to display in case of failure - - - - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. - - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - - - - Verifies that two objects are equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are not equal an is thrown. - - The value that is expected - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two objects are equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are not equal an is thrown. - - The value that is expected - The actual value - The message to display in case of failure - - - - Verifies that two objects are equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are not equal an is thrown. - - The value that is expected - The actual value - - - - Verifies that two ints are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two ints are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two ints are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two longs are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two longs are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two longs are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two unsigned ints are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two unsigned ints are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two unsigned ints are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two unsigned longs are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two unsigned longs are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two unsigned longs are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two decimals are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two decimals are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two decimals are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two floats are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two floats are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two floats are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two doubles are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two doubles are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two doubles are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two objects are not equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are equal an is thrown. - - The value that is expected - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two objects are not equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are equal an is thrown. - - The value that is expected - The actual value - The message to display in case of failure - - - - Verifies that two objects are not equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are equal an is thrown. - - The value that is expected - The actual value - - - - Asserts that two objects refer to the same object. If they - are not the same an is thrown. - - The expected object - The actual object - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that two objects refer to the same object. If they - are not the same an is thrown. - - The expected object - The actual object - The message to display in case of failure - - - - Asserts that two objects refer to the same object. If they - are not the same an is thrown. - - The expected object - The actual object - - - - Asserts that two objects do not refer to the same object. If they - are the same an is thrown. - - The expected object - The actual object - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that two objects do not refer to the same object. If they - are the same an is thrown. - - The expected object - The actual object - The message to display in case of failure - - - - Asserts that two objects do not refer to the same object. If they - are the same an is thrown. - - The expected object - The actual object - - - - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. - - The value that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. - - The value that is to be tested - The message to display in case of failure - - - - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. - - The value that is to be tested - - - - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. - - The value that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. - - The value that is to be tested - The message to display in case of failure - - - - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. - - The value that is to be tested - - - - Assert that a string is empty - that is equal to string.Empty - - The string to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Assert that a string is empty - that is equal to string.Empty - - The string to be tested - The message to display in case of failure - - - - Assert that a string is empty - that is equal to string.Empty - - The string to be tested - - - - Assert that an array, list or other collection is empty - - An array, list or other collection implementing ICollection - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Assert that an array, list or other collection is empty - - An array, list or other collection implementing ICollection - The message to display in case of failure - - - - Assert that an array, list or other collection is empty - - An array, list or other collection implementing ICollection - - - - Assert that a string is not empty - that is not equal to string.Empty - - The string to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Assert that a string is not empty - that is not equal to string.Empty - - The string to be tested - The message to display in case of failure - - - - Assert that a string is not empty - that is not equal to string.Empty - - The string to be tested - - - - Assert that an array, list or other collection is not empty - - An array, list or other collection implementing ICollection - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Assert that an array, list or other collection is not empty - - An array, list or other collection implementing ICollection - The message to display in case of failure - - - - Assert that an array, list or other collection is not empty - - An array, list or other collection implementing ICollection - - - - Assert that a string is either null or equal to string.Empty - - The string to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Assert that a string is either null or equal to string.Empty - - The string to be tested - The message to display in case of failure - - - - Assert that a string is either null or equal to string.Empty - - The string to be tested - - - - Assert that a string is not null or empty - - The string to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Assert that a string is not null or empty - - The string to be tested - The message to display in case of failure - - - - Assert that a string is not null or empty - - The string to be tested - - - - Asserts that an object may be assigned a value of a given Type. - - The expected Type. - The object under examination - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object may be assigned a value of a given Type. - - The expected Type. - The object under examination - The message to display in case of failure - - - - Asserts that an object may be assigned a value of a given Type. - - The expected Type. - The object under examination - - - - Asserts that an object may be assigned a value of a given Type. - - The expected Type. - The object under examination - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object may be assigned a value of a given Type. - - The expected Type. - The object under examination - The message to display in case of failure - - - - Asserts that an object may be assigned a value of a given Type. - - The expected Type. - The object under examination - - - - Asserts that an object may not be assigned a value of a given Type. - - The expected Type. - The object under examination - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object may not be assigned a value of a given Type. - - The expected Type. - The object under examination - The message to display in case of failure - - - - Asserts that an object may not be assigned a value of a given Type. - - The expected Type. - The object under examination - - - - Asserts that an object may not be assigned a value of a given Type. - - The expected Type. - The object under examination - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object may not be assigned a value of a given Type. - - The expected Type. - The object under examination - The message to display in case of failure - - - - Asserts that an object may not be assigned a value of a given Type. - - The expected Type. - The object under examination - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Asserts that an object is contained in a list. - - The expected object - The list to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object is contained in a list. - - The expected object - The list to be examined - The message to display in case of failure - - - - Asserts that an object is contained in a list. - - The expected object - The list to be examined - - - - Helper for Assert.AreEqual(double expected, double actual, ...) - allowing code generation to work consistently. - - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Gets the number of assertions executed so far and - resets the counter to zero. - - - - - AssertionHelper is an optional base class for user tests, - allowing the use of shorter names for constraints and - asserts and avoiding conflict with the definition of - , from which it inherits much of its - behavior, in certain mock object frameworks. - - - - - Helper class with properties and methods that supply - a number of constraints used in Asserts. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding only if a specified number of them succeed. - - - - - Returns a new PropertyConstraintExpression, which will either - test for the existence of the named property on the object - being tested or apply any following constraint to that property. - - - - - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. - - - - - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. - - - - - Returns a constraint that tests two items for equality - - - - - Returns a constraint that tests that two references are the same object - - - - - Returns a constraint that tests whether the - actual value is greater than the suppled argument - - - - - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument - - - - - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument - - - - - Returns a constraint that tests whether the - actual value is less than the suppled argument - - - - - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument - - - - - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument - - - - - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. - - - - - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is a collection containing the same elements as the - collection supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is a subset of the collection supplied as an argument. - - - - - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. - - - - - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. - - - - - Returns a new ContainsConstraint. This constraint - will, in turn, make use of the appropriate second-level - constraint, depending on the type of the actual argument. - This overload is only used if the item sought is a string, - since any other type implies that we are looking for a - collection member. - - - - - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that fails if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that fails if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that fails if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value matches the regular expression supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value matches the regular expression supplied as an argument. - - - - - Returns a constraint that fails if the actual - value matches the pattern supplied as an argument. - - - - - Returns a constraint that tests whether the path provided - is the same as an expected path after canonicalization. - - - - - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. - - - - - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. - - - - - Returns a constraint that tests whether the actual value falls - within a specified range. - - - - - Returns a ConstraintExpression that negates any - following constraint. - - - - - Returns a ConstraintExpression that negates any - following constraint. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if at least one of them succeeds. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them fail. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Length property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Count property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Message property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the InnerException property of the object being tested. - - - - - Returns a constraint that tests for null - - - - - Returns a constraint that tests for True - - - - - Returns a constraint that tests for False - - - - - Returns a constraint that tests for a positive value - - - - - Returns a constraint that tests for a negative value - - - - - Returns a constraint that tests for NaN - - - - - Returns a constraint that tests for empty - - - - - Returns a constraint that tests whether a collection - contains all unique items. - - - - - Returns a constraint that tests whether an object graph is serializable in binary format. - - - - - Returns a constraint that tests whether an object graph is serializable in xml format. - - - - - Returns a constraint that tests whether a collection is ordered - - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. Works - identically to Assert.That. - - The actual value to test - A Constraint to be applied - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. Works - identically to Assert.That. - - The actual value to test - A Constraint to be applied - The message to be displayed in case of failure - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. Works - identically to Assert.That. - - The actual value to test - A Constraint to be applied - The message to be displayed in case of failure - Arguments to use in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . Works Identically to - . - - The evaluated condition - The message to display if the condition is false - Arguments to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . Works Identically to - . - - The evaluated condition - The message to display if the condition is false - - - - Asserts that a condition is true. If the condition is false the method throws - an . Works Identically to . - - The evaluated condition - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - The message that will be displayed on failure - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - An ActualValueDelegate returning the value to be tested - A Constraint expression to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - The actual value to test - A Constraint to be applied - - - - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - The actual value to test - A Constraint to be applied - The message that will be displayed on failure - - - - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - The actual value to test - A Constraint to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that the code represented by a delegate throws an exception - that satisfies the constraint provided. - - A TestDelegate to be executed - A ThrowsConstraint used in the test - - - - Returns a ListMapper based on a collection. - - The original collection - - - - - Provides static methods to express the assumptions - that must be met for a test to give a meaningful - result. If an assumption is not met, the test - should produce an inconclusive result. - - - - - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. - - - - - - - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. - - - - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - A Constraint expression to be applied - The actual value to test - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display if the condition is false - Arguments to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display if the condition is false - - - - Asserts that a condition is true. If the condition is false the - method throws an . - - The evaluated condition - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - The message that will be displayed on failure - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - An ActualValueDelegate returning the value to be tested - A Constraint expression to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - A Constraint expression to be applied - The actual value to test - - - - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure - - - - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that the code represented by a delegate throws an exception - that satisfies the constraint provided. - - A TestDelegate to be executed - A ThrowsConstraint used in the test - - - - Waits for pending asynchronous operations to complete, if appropriate, - and returns a proper result of the invocation by unwrapping task results - - The raw result of the method invocation - The unwrapped result, if necessary - - - - A set of Assert methods operationg on one or more collections - - - - - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. - - - - - - - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. - - - - - - - Asserts that all items contained in collection are of the type specified by expectedType. - - IEnumerable containing objects to be considered - System.Type that all objects in collection must be instances of - - - - Asserts that all items contained in collection are of the type specified by expectedType. - - IEnumerable containing objects to be considered - System.Type that all objects in collection must be instances of - The message that will be displayed on failure - - - - Asserts that all items contained in collection are of the type specified by expectedType. - - IEnumerable containing objects to be considered - System.Type that all objects in collection must be instances of - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that all items contained in collection are not equal to null. - - IEnumerable containing objects to be considered - - - - Asserts that all items contained in collection are not equal to null. - - IEnumerable containing objects to be considered - The message that will be displayed on failure - - - - Asserts that all items contained in collection are not equal to null. - - IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Ensures that every object contained in collection exists within the collection - once and only once. - - IEnumerable of objects to be considered - - - - Ensures that every object contained in collection exists within the collection - once and only once. - - IEnumerable of objects to be considered - The message that will be displayed on failure - - - - Ensures that every object contained in collection exists within the collection - once and only once. - - IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - - - - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. - If comparer is not null then it will be used to compare the objects. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - - - - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - - - - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. - If comparer is not null then it will be used to compare the objects. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - The message that will be displayed on failure - - - - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. - If comparer is not null then it will be used to compare the objects. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - - - - Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - - - - Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that expected and actual are not exactly equal. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - - - - Asserts that expected and actual are not exactly equal. - If comparer is not null then it will be used to compare the objects. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - - - - Asserts that expected and actual are not exactly equal. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - - - - Asserts that expected and actual are not exactly equal. - If comparer is not null then it will be used to compare the objects. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - The message that will be displayed on failure - - - - Asserts that expected and actual are not exactly equal. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that expected and actual are not exactly equal. - If comparer is not null then it will be used to compare the objects. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that expected and actual are not equivalent. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - - - - Asserts that expected and actual are not equivalent. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - - - - Asserts that expected and actual are not equivalent. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that collection contains actual as an item. - - IEnumerable of objects to be considered - Object to be found within collection - - - - Asserts that collection contains actual as an item. - - IEnumerable of objects to be considered - Object to be found within collection - The message that will be displayed on failure - - - - Asserts that collection contains actual as an item. - - IEnumerable of objects to be considered - Object to be found within collection - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that collection does not contain actual as an item. - - IEnumerable of objects to be considered - Object that cannot exist within collection - - - - Asserts that collection does not contain actual as an item. - - IEnumerable of objects to be considered - Object that cannot exist within collection - The message that will be displayed on failure - - - - Asserts that collection does not contain actual as an item. - - IEnumerable of objects to be considered - Object that cannot exist within collection - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that superset is not a subject of subset. - - The IEnumerable superset to be considered - The IEnumerable subset to be considered - - - - Asserts that superset is not a subject of subset. - - The IEnumerable superset to be considered - The IEnumerable subset to be considered - The message that will be displayed on failure - - - - Asserts that superset is not a subject of subset. - - The IEnumerable superset to be considered - The IEnumerable subset to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that superset is a subset of subset. - - The IEnumerable superset to be considered - The IEnumerable subset to be considered - - - - Asserts that superset is a subset of subset. - - The IEnumerable superset to be considered - The IEnumerable subset to be considered - The message that will be displayed on failure - - - - Asserts that superset is a subset of subset. - - The IEnumerable superset to be considered - The IEnumerable subset to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Assert that an array, list or other collection is empty - - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - Arguments to be used in formatting the message - - - - Assert that an array, list or other collection is empty - - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - - - - Assert that an array,list or other collection is empty - - An array, list or other collection implementing IEnumerable - - - - Assert that an array, list or other collection is empty - - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - Arguments to be used in formatting the message - - - - Assert that an array, list or other collection is empty - - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - - - - Assert that an array,list or other collection is empty - - An array, list or other collection implementing IEnumerable - - - - Assert that an array, list or other collection is ordered - - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - Arguments to be used in formatting the message - - - - Assert that an array, list or other collection is ordered - - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - - - - Assert that an array, list or other collection is ordered - - An array, list or other collection implementing IEnumerable - - - - Assert that an array, list or other collection is ordered - - An array, list or other collection implementing IEnumerable - A custom comparer to perform the comparisons - The message to be displayed on failure - Arguments to be used in formatting the message - - - - Assert that an array, list or other collection is ordered - - An array, list or other collection implementing IEnumerable - A custom comparer to perform the comparisons - The message to be displayed on failure - - - - Assert that an array, list or other collection is ordered - - An array, list or other collection implementing IEnumerable - A custom comparer to perform the comparisons - - - - Helper class with properties and methods that supply - a number of constraints used in Asserts. - - - - - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. - - - - - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. - - - - - Summary description for DirectoryAssert - - - - - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. - - - - - - - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. - - - - - - - We don't actually want any instances of this object, but some people - like to inherit from it to add other static methods. Hence, the - protected constructor disallows any instances of this object. - - - - - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - A directory containing the value that is expected - A directory containing the actual value - The message to display if directories are not equal - Arguments to be used in formatting the message - - - - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - A directory containing the value that is expected - A directory containing the actual value - The message to display if directories are not equal - - - - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - A directory containing the value that is expected - A directory containing the actual value - - - - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - A directory path string containing the value that is expected - A directory path string containing the actual value - The message to display if directories are not equal - Arguments to be used in formatting the message - - - - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - A directory path string containing the value that is expected - A directory path string containing the actual value - The message to display if directories are not equal - - - - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - A directory path string containing the value that is expected - A directory path string containing the actual value - - - - Asserts that two directories are not equal. If they are equal - an is thrown. - - A directory containing the value that is expected - A directory containing the actual value - The message to display if directories are not equal - Arguments to be used in formatting the message - - - - Asserts that two directories are not equal. If they are equal - an is thrown. - - A directory containing the value that is expected - A directory containing the actual value - The message to display if directories are not equal - - - - Asserts that two directories are not equal. If they are equal - an is thrown. - - A directory containing the value that is expected - A directory containing the actual value - - - - Asserts that two directories are not equal. If they are equal - an is thrown. - - A directory path string containing the value that is expected - A directory path string containing the actual value - The message to display if directories are equal - Arguments to be used in formatting the message - - - - Asserts that two directories are not equal. If they are equal - an is thrown. - - A directory path string containing the value that is expected - A directory path string containing the actual value - The message to display if directories are equal - - - - Asserts that two directories are not equal. If they are equal - an is thrown. - - A directory path string containing the value that is expected - A directory path string containing the actual value - - - - Asserts that the directory is empty. If it is not empty - an is thrown. - - A directory to search - The message to display if directories are not equal - Arguments to be used in formatting the message - - - - Asserts that the directory is empty. If it is not empty - an is thrown. - - A directory to search - The message to display if directories are not equal - - - - Asserts that the directory is empty. If it is not empty - an is thrown. - - A directory to search - - - - Asserts that the directory is empty. If it is not empty - an is thrown. - - A directory to search - The message to display if directories are not equal - Arguments to be used in formatting the message - - - - Asserts that the directory is empty. If it is not empty - an is thrown. - - A directory to search - The message to display if directories are not equal - - - - Asserts that the directory is empty. If it is not empty - an is thrown. - - A directory to search - - - - Asserts that the directory is not empty. If it is empty - an is thrown. - - A directory to search - The message to display if directories are not equal - Arguments to be used in formatting the message - - - - Asserts that the directory is not empty. If it is empty - an is thrown. - - A directory to search - The message to display if directories are not equal - - - - Asserts that the directory is not empty. If it is empty - an is thrown. - - A directory to search - - - - Asserts that the directory is not empty. If it is empty - an is thrown. - - A directory to search - The message to display if directories are not equal - Arguments to be used in formatting the message - - - - Asserts that the directory is not empty. If it is empty - an is thrown. - - A directory to search - The message to display if directories are not equal - - - - Asserts that the directory is not empty. If it is empty - an is thrown. - - A directory to search - - - - Asserts that path contains actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - Arguments to be used in formatting the message - - - - Asserts that path contains actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - - - - Asserts that path contains actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - - - - Asserts that path contains actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - Arguments to be used in formatting the message - - - - Asserts that path contains actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - - - - Asserts that path contains actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - - - - Asserts that path does not contain actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - Arguments to be used in formatting the message - - - - Asserts that path does not contain actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - - - - Asserts that path does not contain actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - - - - Asserts that path does not contain actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - Arguments to be used in formatting the message - - - - Asserts that path does not contain actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - - - - Asserts that path does not contain actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - - - - Summary description for FileAssert. - - - - - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. - - - - - - - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. - - - - - - - We don't actually want any instances of this object, but some people - like to inherit from it to add other static methods. Hence, the - protected constructor disallows any instances of this object. - - - - - Verifies that two Streams are equal. Two Streams are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - The expected Stream - The actual Stream - The message to display if Streams are not equal - Arguments to be used in formatting the message - - - - Verifies that two Streams are equal. Two Streams are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - The expected Stream - The actual Stream - The message to display if objects are not equal - - - - Verifies that two Streams are equal. Two Streams are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - The expected Stream - The actual Stream - - - - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - A file containing the value that is expected - A file containing the actual value - The message to display if Streams are not equal - Arguments to be used in formatting the message - - - - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - A file containing the value that is expected - A file containing the actual value - The message to display if objects are not equal - - - - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - A file containing the value that is expected - A file containing the actual value - - - - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - The path to a file containing the value that is expected - The path to a file containing the actual value - The message to display if Streams are not equal - Arguments to be used in formatting the message - - - - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - The path to a file containing the value that is expected - The path to a file containing the actual value - The message to display if objects are not equal - - - - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - The path to a file containing the value that is expected - The path to a file containing the actual value - - - - Asserts that two Streams are not equal. If they are equal - an is thrown. - - The expected Stream - The actual Stream - The message to be displayed when the two Stream are the same. - Arguments to be used in formatting the message - - - - Asserts that two Streams are not equal. If they are equal - an is thrown. - - The expected Stream - The actual Stream - The message to be displayed when the Streams are the same. - - - - Asserts that two Streams are not equal. If they are equal - an is thrown. - - The expected Stream - The actual Stream - - - - Asserts that two files are not equal. If they are equal - an is thrown. - - A file containing the value that is expected - A file containing the actual value - The message to display if Streams are not equal - Arguments to be used in formatting the message - - - - Asserts that two files are not equal. If they are equal - an is thrown. - - A file containing the value that is expected - A file containing the actual value - The message to display if objects are not equal - - - - Asserts that two files are not equal. If they are equal - an is thrown. - - A file containing the value that is expected - A file containing the actual value - - - - Asserts that two files are not equal. If they are equal - an is thrown. - - The path to a file containing the value that is expected - The path to a file containing the actual value - The message to display if Streams are not equal - Arguments to be used in formatting the message - - - - Asserts that two files are not equal. If they are equal - an is thrown. - - The path to a file containing the value that is expected - The path to a file containing the actual value - The message to display if objects are not equal - - - - Asserts that two files are not equal. If they are equal - an is thrown. - - The path to a file containing the value that is expected - The path to a file containing the actual value - - - - GlobalSettings is a place for setting default values used - by the framework in performing asserts. - - - - - Default tolerance for floating point equality - - - - - Class used to guard against unexpected argument values - by throwing an appropriate exception. - - - - - Throws an exception if an argument is null - - The value to be tested - The name of the argument - - - - Throws an exception if a string argument is null or empty - - The value to be tested - The name of the argument - - - - Helper class with properties and methods that supply - a number of constraints used in Asserts. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding only if a specified number of them succeed. - - - - - Returns a new PropertyConstraintExpression, which will either - test for the existence of the named property on the object - being tested or apply any following constraint to that property. - - - - - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. - - - - - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. - - - - - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. - - - - - Returns a ConstraintExpression that negates any - following constraint. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if at least one of them succeeds. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them fail. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Length property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Count property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Message property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the InnerException property of the object being tested. - - - - - Interface implemented by a user fixture in order to - validate any expected exceptions. It is only called - for test methods marked with the ExpectedException - attribute. - - - - - Method to handle an expected exception - - The exception to be handled - - - - Helper class with properties and methods that supply - a number of constraints used in Asserts. - - - - - Returns a constraint that tests two items for equality - - - - - Returns a constraint that tests that two references are the same object - - - - - Returns a constraint that tests whether the - actual value is greater than the suppled argument - - - - - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument - - - - - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument - - - - - Returns a constraint that tests whether the - actual value is less than the suppled argument - - - - - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument - - - - - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument - - - - - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. - - - - - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is a collection containing the same elements as the - collection supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is a subset of the collection supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value matches the regular expression supplied as an argument. - - - - - Returns a constraint that tests whether the path provided - is the same as an expected path after canonicalization. - - - - - Returns a constraint that tests whether the path provided - is under an expected path after canonicalization. - - - - - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. - - - - - Returns a constraint that tests whether the actual value falls - within a specified range. - - - - - Returns a ConstraintExpression that negates any - following constraint. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. - - - - - Returns a constraint that tests for null - - - - - Returns a constraint that tests for True - - - - - Returns a constraint that tests for False - - - - - Returns a constraint that tests for a positive value - - - - - Returns a constraint that tests for a negative value - - - - - Returns a constraint that tests for NaN - - - - - Returns a constraint that tests for empty - - - - - Returns a constraint that tests whether a collection - contains all unique items. - - - - - Returns a constraint that tests whether an object graph is serializable in binary format. - - - - - Returns a constraint that tests whether an object graph is serializable in xml format. - - - - - Returns a constraint that tests whether a collection is ordered - - - - - The ITestCaseData interface is implemented by a class - that is able to return complete testcases for use by - a parameterized test method. - - NOTE: This interface is used in both the framework - and the core, even though that results in two different - types. However, sharing the source code guarantees that - the various implementations will be compatible and that - the core is able to reflect successfully over the - framework implementations of ITestCaseData. - - - - - Gets the argument list to be provided to the test - - - - - Gets the expected result - - - - - Indicates whether a result has been specified. - This is necessary because the result may be - null, so it's value cannot be checked. - - - - - Gets the expected exception Type - - - - - Gets the FullName of the expected exception - - - - - Gets the name to be used for the test - - - - - Gets the description of the test - - - - - Gets a value indicating whether this is ignored. - - true if ignored; otherwise, false. - - - - Gets a value indicating whether this is explicit. - - true if explicit; otherwise, false. - - - - Gets the ignore reason. - - The ignore reason. - - - - The Iz class is a synonym for Is intended for use in VB, - which regards Is as a keyword. - - - - - The List class is a helper class with properties and methods - that supply a number of constraints used with lists and collections. - - - - - List.Map returns a ListMapper, which can be used to map - the original collection to another collection. - - - - - - - ListMapper is used to transform a collection used as an actual argument - producing another collection to be used in the assertion. - - - - - Construct a ListMapper based on a collection - - The collection to be transformed - - - - Produces a collection containing all the values of a property - - The collection of property values - - - - - Randomizer returns a set of random values in a repeatable - way, to allow re-running of tests if necessary. - - - - - Get a randomizer for a particular member, returning - one that has already been created if it exists. - This ensures that the same values are generated - each time the tests are reloaded. - - - - - Get a randomizer for a particular parameter, returning - one that has already been created if it exists. - This ensures that the same values are generated - each time the tests are reloaded. - - - - - Construct a randomizer using a random seed - - - - - Construct a randomizer using a specified seed - - - - - Return an array of random doubles between 0.0 and 1.0. - - - - - - - Return an array of random doubles with values in a specified range. - - - - - Return an array of random ints with values in a specified range. - - - - - Get a random seed for use in creating a randomizer. - - - - - The SpecialValue enum is used to represent TestCase arguments - that cannot be used as arguments to an Attribute. - - - - - Null represents a null value, which cannot be used as an - argument to an attribute under .NET 1.x - - - - - Basic Asserts on strings. - - - - - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. - - - - - - - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. - - - - - - - Asserts that a string is found within another string. - - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string is found within another string. - - The expected string - The string to be examined - The message to display in case of failure - - - - Asserts that a string is found within another string. - - The expected string - The string to be examined - - - - Asserts that a string is not found within another string. - - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string is found within another string. - - The expected string - The string to be examined - The message to display in case of failure - - - - Asserts that a string is found within another string. - - The expected string - The string to be examined - - - - Asserts that a string starts with another string. - - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string starts with another string. - - The expected string - The string to be examined - The message to display in case of failure - - - - Asserts that a string starts with another string. - - The expected string - The string to be examined - - - - Asserts that a string does not start with another string. - - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string does not start with another string. - - The expected string - The string to be examined - The message to display in case of failure - - - - Asserts that a string does not start with another string. - - The expected string - The string to be examined - - - - Asserts that a string ends with another string. - - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string ends with another string. - - The expected string - The string to be examined - The message to display in case of failure - - - - Asserts that a string ends with another string. - - The expected string - The string to be examined - - - - Asserts that a string does not end with another string. - - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string does not end with another string. - - The expected string - The string to be examined - The message to display in case of failure - - - - Asserts that a string does not end with another string. - - The expected string - The string to be examined - - - - Asserts that two strings are equal, without regard to case. - - The expected string - The actual string - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that two strings are equal, without regard to case. - - The expected string - The actual string - The message to display in case of failure - - - - Asserts that two strings are equal, without regard to case. - - The expected string - The actual string - - - - Asserts that two strings are not equal, without regard to case. - - The expected string - The actual string - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that two strings are Notequal, without regard to case. - - The expected string - The actual string - The message to display in case of failure - - - - Asserts that two strings are not equal, without regard to case. - - The expected string - The actual string - - - - Asserts that a string matches an expected regular expression pattern. - - The regex pattern to be matched - The actual string - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string matches an expected regular expression pattern. - - The regex pattern to be matched - The actual string - The message to display in case of failure - - - - Asserts that a string matches an expected regular expression pattern. - - The regex pattern to be matched - The actual string - - - - Asserts that a string does not match an expected regular expression pattern. - - The regex pattern to be used - The actual string - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string does not match an expected regular expression pattern. - - The regex pattern to be used - The actual string - The message to display in case of failure - - - - Asserts that a string does not match an expected regular expression pattern. - - The regex pattern to be used - The actual string - - - - The TestCaseData class represents a set of arguments - and other parameter info to be used for a parameterized - test case. It provides a number of instance modifiers - for use in initializing the test case. - - Note: Instance modifiers are getters that return - the same instance after modifying it's state. - - - - - The argument list to be provided to the test - - - - - The expected result to be returned - - - - - Set to true if this has an expected result - - - - - The expected exception Type - - - - - The FullName of the expected exception - - - - - The name to be used for the test - - - - - The description of the test - - - - - A dictionary of properties, used to add information - to tests without requiring the class to change. - - - - - If true, indicates that the test case is to be ignored - - - - - If true, indicates that the test case is marked explicit - - - - - The reason for ignoring a test case - - - - - Initializes a new instance of the class. - - The arguments. - - - - Initializes a new instance of the class. - - The argument. - - - - Initializes a new instance of the class. - - The first argument. - The second argument. - - - - Initializes a new instance of the class. - - The first argument. - The second argument. - The third argument. - - - - Sets the expected result for the test - - The expected result - A modified TestCaseData - - - - Sets the expected exception type for the test - - Type of the expected exception. - The modified TestCaseData instance - - - - Sets the expected exception type for the test - - FullName of the expected exception. - The modified TestCaseData instance - - - - Sets the name of the test case - - The modified TestCaseData instance - - - - Sets the description for the test case - being constructed. - - The description. - The modified TestCaseData instance. - - - - Applies a category to the test - - - - - - - Applies a named property to the test - - - - - - - - Applies a named property to the test - - - - - - - - Applies a named property to the test - - - - - - - - Ignores this TestCase. - - - - - - Ignores this TestCase, specifying the reason. - - The reason. - - - - - Marks this TestCase as Explicit - - - - - - Marks this TestCase as Explicit, specifying the reason. - - The reason. - - - - - Gets the argument list to be provided to the test - - - - - Gets the expected result - - - - - Returns true if the result has been set - - - - - Gets the expected exception Type - - - - - Gets the FullName of the expected exception - - - - - Gets the name to be used for the test - - - - - Gets the description of the test - - - - - Gets a value indicating whether this is ignored. - - true if ignored; otherwise, false. - - - - Gets a value indicating whether this is explicit. - - true if explicit; otherwise, false. - - - - Gets the ignore reason. - - The ignore reason. - - - - Gets a list of categories associated with this test. - - - - - Gets the property dictionary for this test - - - - - Provide the context information of the current test - - - - - Constructs a TestContext using the provided context dictionary - - A context dictionary - - - - Get the current test context. This is created - as needed. The user may save the context for - use within a test, but it should not be used - outside the test for which it is created. - - - - - Gets a TestAdapter representing the currently executing test in this context. - - - - - Gets a ResultAdapter representing the current result for the test - executing in this context. - - - - - Gets the directory containing the current test assembly. - - - - - Gets the directory to be used for outputing files created - by this test run. - - - - - TestAdapter adapts a Test for consumption by - the user test code. - - - - - Constructs a TestAdapter for this context - - The context dictionary - - - - The name of the test. - - - - - The FullName of the test - - - - - The properties of the test. - - - - - ResultAdapter adapts a TestResult for consumption by - the user test code. - - - - - Construct a ResultAdapter for a context - - The context holding the result - - - - The TestState of current test. This maps to the ResultState - used in nunit.core and is subject to change in the future. - - - - - The TestStatus of current test. This enum will be used - in future versions of NUnit and so is to be preferred - to the TestState value. - - - - - Provides details about a test - - - - - Creates an instance of TestDetails - - The fixture that the test is a member of, if available. - The method that implements the test, if available. - The full name of the test. - A string representing the type of test, e.g. "Test Case". - Indicates if the test represents a suite of tests. - - - - The fixture that the test is a member of, if available. - - - - - The method that implements the test, if available. - - - - - The full name of the test. - - - - - A string representing the type of test, e.g. "Test Case". - - - - - Indicates if the test represents a suite of tests. - - - - - The ResultState enum indicates the result of running a test - - - - - The result is inconclusive - - - - - The test was not runnable. - - - - - The test has been skipped. - - - - - The test has been ignored. - - - - - The test succeeded - - - - - The test failed - - - - - The test encountered an unexpected exception - - - - - The test was cancelled by the user - - - - - The TestStatus enum indicates the result of running a test - - - - - The test was inconclusive - - - - - The test has skipped - - - - - The test succeeded - - - - - The test failed - - - - - Helper class with static methods used to supply constraints - that operate on strings. - - - - - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that fails if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that fails if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that fails if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. - - - - - Returns a constraint that fails if the actual - value matches the pattern supplied as an argument. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. - - - - - TextMessageWriter writes constraint descriptions and messages - in displayable form as a text stream. It tailors the display - of individual message components to form the standard message - format of NUnit assertion failure messages. - - - - - MessageWriter is the abstract base for classes that write - constraint descriptions and messages in some form. The - class has separate methods for writing various components - of a message, allowing implementations to tailor the - presentation as needed. - - - - - Construct a MessageWriter given a culture - - - - - Method to write single line message with optional args, usually - written to precede the general failure message. - - The message to be written - Any arguments used in formatting the message - - - - Method to write single line message with optional args, usually - written to precede the general failure message, at a givel - indentation level. - - The indentation level of the message - The message to be written - Any arguments used in formatting the message - - - - Display Expected and Actual lines for a constraint. This - is called by MessageWriter's default implementation of - WriteMessageTo and provides the generic two-line display. - - The constraint that failed - - - - Display Expected and Actual lines for given values. This - method may be called by constraints that need more control over - the display of actual and expected values than is provided - by the default implementation. - - The expected value - The actual value causing the failure - - - - Display Expected and Actual lines for given values, including - a tolerance value on the Expected line. - - The expected value - The actual value causing the failure - The tolerance within which the test was made - - - - Display the expected and actual string values on separate lines. - If the mismatch parameter is >=0, an additional line is displayed - line containing a caret that points to the mismatch point. - - The expected string value - The actual string value - The point at which the strings don't match or -1 - If true, case is ignored in locating the point where the strings differ - If true, the strings should be clipped to fit the line - - - - Writes the text for a connector. - - The connector. - - - - Writes the text for a predicate. - - The predicate. - - - - Writes the text for an expected value. - - The expected value. - - - - Writes the text for a modifier - - The modifier. - - - - Writes the text for an actual value. - - The actual value. - - - - Writes the text for a generalized value. - - The value. - - - - Writes the text for a collection value, - starting at a particular point, to a max length - - The collection containing elements to write. - The starting point of the elements to write - The maximum number of elements to write - - - - Abstract method to get the max line length - - - - - Prefix used for the expected value line of a message - - - - - Prefix used for the actual value line of a message - - - - - Length of a message prefix - - - - - Construct a TextMessageWriter - - - - - Construct a TextMessageWriter, specifying a user message - and optional formatting arguments. - - - - - - - Method to write single line message with optional args, usually - written to precede the general failure message, at a givel - indentation level. - - The indentation level of the message - The message to be written - Any arguments used in formatting the message - - - - Display Expected and Actual lines for a constraint. This - is called by MessageWriter's default implementation of - WriteMessageTo and provides the generic two-line display. - - The constraint that failed - - - - Display Expected and Actual lines for given values. This - method may be called by constraints that need more control over - the display of actual and expected values than is provided - by the default implementation. - - The expected value - The actual value causing the failure - - - - Display Expected and Actual lines for given values, including - a tolerance value on the expected line. - - The expected value - The actual value causing the failure - The tolerance within which the test was made - - - - Display the expected and actual string values on separate lines. - If the mismatch parameter is >=0, an additional line is displayed - line containing a caret that points to the mismatch point. - - The expected string value - The actual string value - The point at which the strings don't match or -1 - If true, case is ignored in string comparisons - If true, clip the strings to fit the max line length - - - - Writes the text for a connector. - - The connector. - - - - Writes the text for a predicate. - - The predicate. - - - - Write the text for a modifier. - - The modifier. - - - - Writes the text for an expected value. - - The expected value. - - - - Writes the text for an actual value. - - The actual value. - - - - Writes the text for a generalized value. - - The value. - - - - Writes the text for a collection value, - starting at a particular point, to a max length - - The collection containing elements to write. - The starting point of the elements to write - The maximum number of elements to write - - - - Write the generic 'Expected' line for a constraint - - The constraint that failed - - - - Write the generic 'Expected' line for a given value - - The expected value - - - - Write the generic 'Expected' line for a given value - and tolerance. - - The expected value - The tolerance within which the test was made - - - - Write the generic 'Actual' line for a constraint - - The constraint for which the actual value is to be written - - - - Write the generic 'Actual' line for a given value - - The actual value causing a failure - - - - Gets or sets the maximum line length for this writer - - - - - Helper class with properties and methods that supply - constraints that operate on exceptions. - - - - - Creates a constraint specifying the exact type of exception expected - - - - - Creates a constraint specifying the exact type of exception expected - - - - - Creates a constraint specifying the type of exception expected - - - - - Creates a constraint specifying the type of exception expected - - - - - Creates a constraint specifying an expected exception - - - - - Creates a constraint specifying an exception with a given InnerException - - - - - Creates a constraint specifying an expected TargetInvocationException - - - - - Creates a constraint specifying an expected TargetInvocationException - - - - - Creates a constraint specifying an expected TargetInvocationException - - - - - Creates a constraint specifying that no exception is thrown - - - - - Attribute used to apply a category to a test - - - - - The name of the category - - - - - Construct attribute for a given category based on - a name. The name may not contain the characters ',', - '+', '-' or '!'. However, this is not checked in the - constructor since it would cause an error to arise at - as the test was loaded without giving a clear indication - of where the problem is located. The error is handled - in NUnitFramework.cs by marking the test as not - runnable. - - The name of the category - - - - Protected constructor uses the Type name as the name - of the category. - - - - - The name of the category - - - - - Used to mark a field for use as a datapoint when executing a theory - within the same fixture that requires an argument of the field's Type. - - - - - Used to mark an array as containing a set of datapoints to be used - executing a theory within the same fixture that requires an argument - of the Type of the array elements. - - - - - Attribute used to provide descriptive text about a - test case or fixture. - - - - - Construct the attribute - - Text describing the test - - - - Gets the test description - - - - - Enumeration indicating how the expected message parameter is to be used - - - - Expect an exact match - - - Expect a message containing the parameter string - - - Match the regular expression provided as a parameter - - - Expect a message that starts with the parameter string - - - - ExpectedExceptionAttribute - - - - - - Constructor for a non-specific exception - - - - - Constructor for a given type of exception - - The type of the expected exception - - - - Constructor for a given exception name - - The full name of the expected exception - - - - Gets or sets the expected exception type - - - - - Gets or sets the full Type name of the expected exception - - - - - Gets or sets the expected message text - - - - - Gets or sets the user message displayed in case of failure - - - - - Gets or sets the type of match to be performed on the expected message - - - - - Gets the name of a method to be used as an exception handler - - - - - ExplicitAttribute marks a test or test fixture so that it will - only be run if explicitly executed from the gui or command line - or if it is included by use of a filter. The test will not be - run simply because an enclosing suite is run. - - - - - Default constructor - - - - - Constructor with a reason - - The reason test is marked explicit - - - - The reason test is marked explicit - - - - - Attribute used to mark a test that is to be ignored. - Ignored tests result in a warning message when the - tests are run. - - - - - Constructs the attribute without giving a reason - for ignoring the test. - - - - - Constructs the attribute giving a reason for ignoring the test - - The reason for ignoring the test - - - - The reason for ignoring a test - - - - - Abstract base for Attributes that are used to include tests - in the test run based on environmental settings. - - - - - Constructor with no included items specified, for use - with named property syntax. - - - - - Constructor taking one or more included items - - Comma-delimited list of included items - - - - Name of the item that is needed in order for - a test to run. Multiple itemss may be given, - separated by a comma. - - - - - Name of the item to be excluded. Multiple items - may be given, separated by a comma. - - - - - The reason for including or excluding the test - - - - - PlatformAttribute is used to mark a test fixture or an - individual method as applying to a particular platform only. - - - - - Constructor with no platforms specified, for use - with named property syntax. - - - - - Constructor taking one or more platforms - - Comma-deliminted list of platforms - - - - CultureAttribute is used to mark a test fixture or an - individual method as applying to a particular Culture only. - - - - - Constructor with no cultures specified, for use - with named property syntax. - - - - - Constructor taking one or more cultures - - Comma-deliminted list of cultures - - - - Marks a test to use a combinatorial join of any argument data - provided. NUnit will create a test case for every combination of - the arguments provided. This can result in a large number of test - cases and so should be used judiciously. This is the default join - type, so the attribute need not be used except as documentation. - - - - - PropertyAttribute is used to attach information to a test as a name/value pair.. - - - - - Construct a PropertyAttribute with a name and string value - - The name of the property - The property value - - - - Construct a PropertyAttribute with a name and int value - - The name of the property - The property value - - - - Construct a PropertyAttribute with a name and double value - - The name of the property - The property value - - - - Constructor for derived classes that set the - property dictionary directly. - - - - - Constructor for use by derived classes that use the - name of the type as the property name. Derived classes - must ensure that the Type of the property value is - a standard type supported by the BCL. Any custom - types will cause a serialization Exception when - in the client. - - - - - Gets the property dictionary for this attribute - - - - - Default constructor - - - - - Marks a test to use pairwise join of any argument data provided. - NUnit will attempt too excercise every pair of argument values at - least once, using as small a number of test cases as it can. With - only two arguments, this is the same as a combinatorial join. - - - - - Default constructor - - - - - Marks a test to use a sequential join of any argument data - provided. NUnit will use arguements for each parameter in - sequence, generating test cases up to the largest number - of argument values provided and using null for any arguments - for which it runs out of values. Normally, this should be - used with the same number of arguments for each parameter. - - - - - Default constructor - - - - - Summary description for MaxTimeAttribute. - - - - - Construct a MaxTimeAttribute, given a time in milliseconds. - - The maximum elapsed time in milliseconds - - - - RandomAttribute is used to supply a set of random values - to a single parameter of a parameterized test. - - - - - ValuesAttribute is used to provide literal arguments for - an individual parameter of a test. - - - - - Abstract base class for attributes that apply to parameters - and supply data for the parameter. - - - - - Gets the data to be provided to the specified parameter - - - - - The collection of data to be returned. Must - be set by any derived attribute classes. - We use an object[] so that the individual - elements may have their type changed in GetData - if necessary. - - - - - Construct with one argument - - - - - - Construct with two arguments - - - - - - - Construct with three arguments - - - - - - - - Construct with an array of arguments - - - - - - Get the collection of values to be used as arguments - - - - - Construct a set of doubles from 0.0 to 1.0, - specifying only the count. - - - - - - Construct a set of doubles from min to max - - - - - - - - Construct a set of ints from min to max - - - - - - - - Get the collection of values to be used as arguments - - - - - RangeAttribute is used to supply a range of values to an - individual parameter of a parameterized test. - - - - - Construct a range of ints using default step of 1 - - - - - - - Construct a range of ints specifying the step size - - - - - - - - Construct a range of longs - - - - - - - - Construct a range of doubles - - - - - - - - Construct a range of floats - - - - - - - - RepeatAttribute may be applied to test case in order - to run it multiple times. - - - - - Construct a RepeatAttribute - - The number of times to run the test - - - - RequiredAddinAttribute may be used to indicate the names of any addins - that must be present in order to run some or all of the tests in an - assembly. If the addin is not loaded, the entire assembly is marked - as NotRunnable. - - - - - Initializes a new instance of the class. - - The required addin. - - - - Gets the name of required addin. - - The required addin name. - - - - Summary description for SetCultureAttribute. - - - - - Construct given the name of a culture - - - - - - Summary description for SetUICultureAttribute. - - - - - Construct given the name of a culture - - - - - - SetUpAttribute is used in a TestFixture to identify a method - that is called immediately before each test is run. It is - also used in a SetUpFixture to identify the method that is - called once, before any of the subordinate tests are run. - - - - - Attribute used to mark a class that contains one-time SetUp - and/or TearDown methods that apply to all the tests in a - namespace or an assembly. - - - - - Attribute used to mark a static (shared in VB) property - that returns a list of tests. - - - - - Attribute used in a TestFixture to identify a method that is - called immediately after each test is run. It is also used - in a SetUpFixture to identify the method that is called once, - after all subordinate tests have run. In either case, the method - is guaranteed to be called, even if an exception is thrown. - - - - - Provide actions to execute before and after tests. - - - - - When implemented by an attribute, this interface implemented to provide actions to execute before and after tests. - - - - - Executed before each test is run - - Provides details about the test that is going to be run. - - - - Executed after each test is run - - Provides details about the test that has just been run. - - - - Provides the target for the action attribute - - The target for the action attribute - - - - Adding this attribute to a method within a - class makes the method callable from the NUnit test runner. There is a property - called Description which is optional which you can provide a more detailed test - description. This class cannot be inherited. - - - - [TestFixture] - public class Fixture - { - [Test] - public void MethodToTest() - {} - - [Test(Description = "more detailed description")] - publc void TestDescriptionMethod() - {} - } - - - - - - Descriptive text for this test - - - - - TestCaseAttribute is used to mark parameterized test cases - and provide them with their arguments. - - - - - Construct a TestCaseAttribute with a list of arguments. - This constructor is not CLS-Compliant - - - - - - Construct a TestCaseAttribute with a single argument - - - - - - Construct a TestCaseAttribute with a two arguments - - - - - - - Construct a TestCaseAttribute with a three arguments - - - - - - - - Gets the list of arguments to a test case - - - - - Gets or sets the expected result. Use - ExpectedResult by preference. - - The result. - - - - Gets or sets the expected result. - - The result. - - - - Gets a flag indicating whether an expected - result has been set. - - - - - Gets a list of categories associated with this test; - - - - - Gets or sets the category associated with this test. - May be a single category or a comma-separated list. - - - - - Gets or sets the expected exception. - - The expected exception. - - - - Gets or sets the name the expected exception. - - The expected name of the exception. - - - - Gets or sets the expected message of the expected exception - - The expected message of the exception. - - - - Gets or sets the type of match to be performed on the expected message - - - - - Gets or sets the description. - - The description. - - - - Gets or sets the name of the test. - - The name of the test. - - - - Gets or sets the ignored status of the test - - - - - Gets or sets the ignored status of the test - - - - - Gets or sets the explicit status of the test - - - - - Gets or sets the reason for not running the test - - - - - Gets or sets the reason for not running the test. - Set has the side effect of marking the test as ignored. - - The ignore reason. - - - - FactoryAttribute indicates the source to be used to - provide test cases for a test method. - - - - - Construct with the name of the data source, which must - be a property, field or method of the test class itself. - - An array of the names of the factories that will provide data - - - - Construct with a Type, which must implement IEnumerable - - The Type that will provide data - - - - Construct with a Type and name. - that don't support params arrays. - - The Type that will provide data - The name of the method, property or field that will provide data - - - - The name of a the method, property or fiend to be used as a source - - - - - A Type to be used as a source - - - - - Gets or sets the category associated with this test. - May be a single category or a comma-separated list. - - - - - [TestFixture] - public class ExampleClass - {} - - - - - Default constructor - - - - - Construct with a object[] representing a set of arguments. - In .NET 2.0, the arguments may later be separated into - type arguments and constructor arguments. - - - - - - Descriptive text for this fixture - - - - - Gets and sets the category for this fixture. - May be a comma-separated list of categories. - - - - - Gets a list of categories for this fixture - - - - - The arguments originally provided to the attribute - - - - - Gets or sets a value indicating whether this should be ignored. - - true if ignore; otherwise, false. - - - - Gets or sets the ignore reason. May set Ignored as a side effect. - - The ignore reason. - - - - Get or set the type arguments. If not set - explicitly, any leading arguments that are - Types are taken as type arguments. - - - - - Attribute used to identify a method that is - called before any tests in a fixture are run. - - - - - Attribute used to identify a method that is called after - all the tests in a fixture have run. The method is - guaranteed to be called, even if an exception is thrown. - - - - - Adding this attribute to a method within a - class makes the method callable from the NUnit test runner. There is a property - called Description which is optional which you can provide a more detailed test - description. This class cannot be inherited. - - - - [TestFixture] - public class Fixture - { - [Test] - public void MethodToTest() - {} - - [Test(Description = "more detailed description")] - publc void TestDescriptionMethod() - {} - } - - - - - - Used on a method, marks the test with a timeout value in milliseconds. - The test will be run in a separate thread and is cancelled if the timeout - is exceeded. Used on a method or assembly, sets the default timeout - for all contained test methods. - - - - - Construct a TimeoutAttribute given a time in milliseconds - - The timeout value in milliseconds - - - - Marks a test that must run in the STA, causing it - to run in a separate thread if necessary. - - On methods, you may also use STAThreadAttribute - to serve the same purpose. - - - - - Construct a RequiresSTAAttribute - - - - - Marks a test that must run in the MTA, causing it - to run in a separate thread if necessary. - - On methods, you may also use MTAThreadAttribute - to serve the same purpose. - - - - - Construct a RequiresMTAAttribute - - - - - Marks a test that must run on a separate thread. - - - - - Construct a RequiresThreadAttribute - - - - - Construct a RequiresThreadAttribute, specifying the apartment - - - - - ValueSourceAttribute indicates the source to be used to - provide data for one parameter of a test method. - - - - - Construct with the name of the factory - for use with languages - that don't support params arrays. - - The name of the data source to be used - - - - Construct with a Type and name - for use with languages - that don't support params arrays. - - The Type that will provide data - The name of the method, property or field that will provide data - - - - The name of a the method, property or fiend to be used as a source - - - - - A Type to be used as a source - - - - - AllItemsConstraint applies another constraint to each - item in a collection, succeeding if they all succeed. - - - - - Abstract base class used for prefixes - - - - - The Constraint class is the base of all built-in constraints - within NUnit. It provides the operator overloads used to combine - constraints. - - - - - The IConstraintExpression interface is implemented by all - complete and resolvable constraints and expressions. - - - - - Return the top-level constraint for this expression - - - - - - Static UnsetObject used to detect derived constraints - failing to set the actual value. - - - - - The actual value being tested against a constraint - - - - - The display name of this Constraint for use by ToString() - - - - - Argument fields used by ToString(); - - - - - The builder holding this constraint - - - - - Construct a constraint with no arguments - - - - - Construct a constraint with one argument - - - - - Construct a constraint with two arguments - - - - - Sets the ConstraintBuilder holding this constraint - - - - - Write the failure message to the MessageWriter provided - as an argument. The default implementation simply passes - the constraint and the actual value to the writer, which - then displays the constraint description and the value. - - Constraints that need to provide additional details, - such as where the error occured can override this. - - The MessageWriter on which to display the message - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Test whether the constraint is satisfied by an - ActualValueDelegate that returns the value to be tested. - The default implementation simply evaluates the delegate - but derived classes may override it to provide for delayed - processing. - - An - True for success, false for failure - - - - Test whether the constraint is satisfied by a given reference. - The default implementation simply dereferences the value but - derived classes may override it to provide for delayed processing. - - A reference to the value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. - - The writer on which the actual value is displayed - - - - Default override of ToString returns the constraint DisplayName - followed by any arguments within angle brackets. - - - - - - Returns the string representation of this constraint - - - - - This operator creates a constraint that is satisfied only if both - argument constraints are satisfied. - - - - - This operator creates a constraint that is satisfied if either - of the argument constraints is satisfied. - - - - - This operator creates a constraint that is satisfied if the - argument constraint is not satisfied. - - - - - Returns a DelayedConstraint with the specified delay time. - - The delay in milliseconds. - - - - - Returns a DelayedConstraint with the specified delay time - and polling interval. - - The delay in milliseconds. - The interval at which to test the constraint. - - - - - The display name of this Constraint for use by ToString(). - The default value is the name of the constraint with - trailing "Constraint" removed. Derived classes may set - this to another name in their constructors. - - - - - Returns a ConstraintExpression by appending And - to the current constraint. - - - - - Returns a ConstraintExpression by appending And - to the current constraint. - - - - - Returns a ConstraintExpression by appending Or - to the current constraint. - - - - - Class used to detect any derived constraints - that fail to set the actual value in their - Matches override. - - - - - The base constraint - - - - - Construct given a base constraint - - - - - - Construct an AllItemsConstraint on top of an existing constraint - - - - - - Apply the item constraint to each item in the collection, - failing if any item fails. - - - - - - - Write a description of this constraint to a MessageWriter - - - - - - AndConstraint succeeds only if both members succeed. - - - - - BinaryConstraint is the abstract base of all constraints - that combine two other constraints in some fashion. - - - - - The first constraint being combined - - - - - The second constraint being combined - - - - - Construct a BinaryConstraint from two other constraints - - The first constraint - The second constraint - - - - Create an AndConstraint from two other constraints - - The first constraint - The second constraint - - - - Apply both member constraints to an actual value, succeeding - succeeding only if both of them succeed. - - The actual value - True if the constraints both succeeded - - - - Write a description for this contraint to a MessageWriter - - The MessageWriter to receive the description - - - - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. - - The writer on which the actual value is displayed - - - - AssignableFromConstraint is used to test that an object - can be assigned from a given Type. - - - - - TypeConstraint is the abstract base for constraints - that take a Type as their expected value. - - - - - The expected Type used by the constraint - - - - - Construct a TypeConstraint for a given Type - - - - - - Write the actual value for a failing constraint test to a - MessageWriter. TypeConstraints override this method to write - the name of the type. - - The writer on which the actual value is displayed - - - - Construct an AssignableFromConstraint for the type provided - - - - - - Test whether an object can be assigned from the specified type - - The object to be tested - True if the object can be assigned a value of the expected Type, otherwise false. - - - - Write a description of this constraint to a MessageWriter - - The MessageWriter to use - - - - AssignableToConstraint is used to test that an object - can be assigned to a given Type. - - - - - Construct an AssignableToConstraint for the type provided - - - - - - Test whether an object can be assigned to the specified type - - The object to be tested - True if the object can be assigned a value of the expected Type, otherwise false. - - - - Write a description of this constraint to a MessageWriter - - The MessageWriter to use - - - - AttributeConstraint tests that a specified attribute is present - on a Type or other provider and that the value of the attribute - satisfies some other constraint. - - - - - Constructs an AttributeConstraint for a specified attriute - Type and base constraint. - - - - - - - Determines whether the Type or other provider has the - expected attribute and if its value matches the - additional constraint specified. - - - - - Writes a description of the attribute to the specified writer. - - - - - Writes the actual value supplied to the specified writer. - - - - - Returns a string representation of the constraint. - - - - - AttributeExistsConstraint tests for the presence of a - specified attribute on a Type. - - - - - Constructs an AttributeExistsConstraint for a specific attribute Type - - - - - - Tests whether the object provides the expected attribute. - - A Type, MethodInfo, or other ICustomAttributeProvider - True if the expected attribute is present, otherwise false - - - - Writes the description of the constraint to the specified writer - - - - - BasicConstraint is the abstract base for constraints that - perform a simple comparison to a constant value. - - - - - Initializes a new instance of the class. - - The expected. - The description. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - BinarySerializableConstraint tests whether - an object is serializable in binary format. - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. - - The writer on which the actual value is displayed - - - - Returns the string representation - - - - - CollectionConstraint is the abstract base class for - constraints that operate on collections. - - - - - Construct an empty CollectionConstraint - - - - - Construct a CollectionConstraint - - - - - - Determines whether the specified enumerable is empty. - - The enumerable. - - true if the specified enumerable is empty; otherwise, false. - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Protected method to be implemented by derived classes - - - - - - - CollectionContainsConstraint is used to test whether a collection - contains an expected object as a member. - - - - - CollectionItemsEqualConstraint is the abstract base class for all - collection constraints that apply some notion of item equality - as a part of their operation. - - - - - Construct an empty CollectionConstraint - - - - - Construct a CollectionConstraint - - - - - - Flag the constraint to use the supplied EqualityAdapter. - NOTE: For internal use only. - - The EqualityAdapter to use. - Self. - - - - Flag the constraint to use the supplied IComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied Comparison object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IEqualityComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IEqualityComparer object. - - The IComparer object to use. - Self. - - - - Compares two collection members for equality - - - - - Return a new CollectionTally for use in making tests - - The collection to be included in the tally - - - - Flag the constraint to ignore case and return self. - - - - - Construct a CollectionContainsConstraint - - - - - - Test whether the expected item is contained in the collection - - - - - - - Write a descripton of the constraint to a MessageWriter - - - - - - CollectionEquivalentCOnstraint is used to determine whether two - collections are equivalent. - - - - - Construct a CollectionEquivalentConstraint - - - - - - Test whether two collections are equivalent - - - - - - - Write a description of this constraint to a MessageWriter - - - - - - CollectionOrderedConstraint is used to test whether a collection is ordered. - - - - - Construct a CollectionOrderedConstraint - - - - - Modifies the constraint to use an IComparer and returns self. - - - - - Modifies the constraint to use an IComparer<T> and returns self. - - - - - Modifies the constraint to use a Comparison<T> and returns self. - - - - - Modifies the constraint to test ordering by the value of - a specified property and returns self. - - - - - Test whether the collection is ordered - - - - - - - Write a description of the constraint to a MessageWriter - - - - - - Returns the string representation of the constraint. - - - - - - If used performs a reverse comparison - - - - - CollectionSubsetConstraint is used to determine whether - one collection is a subset of another - - - - - Construct a CollectionSubsetConstraint - - The collection that the actual value is expected to be a subset of - - - - Test whether the actual collection is a subset of - the expected collection provided. - - - - - - - Write a description of this constraint to a MessageWriter - - - - - - CollectionTally counts (tallies) the number of - occurences of each object in one or more enumerations. - - - - - Construct a CollectionTally object from a comparer and a collection - - - - - Try to remove an object from the tally - - The object to remove - True if successful, false if the object was not found - - - - Try to remove a set of objects from the tally - - The objects to remove - True if successful, false if any object was not found - - - - The number of objects remaining in the tally - - - - - ComparisonAdapter class centralizes all comparisons of - values in NUnit, adapting to the use of any provided - IComparer, IComparer<T> or Comparison<T> - - - - - Returns a ComparisonAdapter that wraps an IComparer - - - - - Returns a ComparisonAdapter that wraps an IComparer<T> - - - - - Returns a ComparisonAdapter that wraps a Comparison<T> - - - - - Compares two objects - - - - - Gets the default ComparisonAdapter, which wraps an - NUnitComparer object. - - - - - Construct a ComparisonAdapter for an IComparer - - - - - Compares two objects - - - - - - - - Construct a default ComparisonAdapter - - - - - ComparisonAdapter<T> extends ComparisonAdapter and - allows use of an IComparer<T> or Comparison<T> - to actually perform the comparison. - - - - - Construct a ComparisonAdapter for an IComparer<T> - - - - - Compare a Type T to an object - - - - - Construct a ComparisonAdapter for a Comparison<T> - - - - - Compare a Type T to an object - - - - - Abstract base class for constraints that compare values to - determine if one is greater than, equal to or less than - the other. This class supplies the Using modifiers. - - - - - ComparisonAdapter to be used in making the comparison - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - - - - Modifies the constraint to use an IComparer and returns self - - - - - Modifies the constraint to use an IComparer<T> and returns self - - - - - Modifies the constraint to use a Comparison<T> and returns self - - - - - Delegate used to delay evaluation of the actual value - to be used in evaluating a constraint - - - - - ConstraintBuilder maintains the stacks that are used in - processing a ConstraintExpression. An OperatorStack - is used to hold operators that are waiting for their - operands to be reognized. a ConstraintStack holds - input constraints as well as the results of each - operator applied. - - - - - Initializes a new instance of the class. - - - - - Appends the specified operator to the expression by first - reducing the operator stack and then pushing the new - operator on the stack. - - The operator to push. - - - - Appends the specified constraint to the expresson by pushing - it on the constraint stack. - - The constraint to push. - - - - Sets the top operator right context. - - The right context. - - - - Reduces the operator stack until the topmost item - precedence is greater than or equal to the target precedence. - - The target precedence. - - - - Resolves this instance, returning a Constraint. If the builder - is not currently in a resolvable state, an exception is thrown. - - The resolved constraint - - - - Gets a value indicating whether this instance is resolvable. - - - true if this instance is resolvable; otherwise, false. - - - - - OperatorStack is a type-safe stack for holding ConstraintOperators - - - - - Initializes a new instance of the class. - - The builder. - - - - Pushes the specified operator onto the stack. - - The op. - - - - Pops the topmost operator from the stack. - - - - - - Gets a value indicating whether this is empty. - - true if empty; otherwise, false. - - - - Gets the topmost operator without modifying the stack. - - The top. - - - - ConstraintStack is a type-safe stack for holding Constraints - - - - - Initializes a new instance of the class. - - The builder. - - - - Pushes the specified constraint. As a side effect, - the constraint's builder field is set to the - ConstraintBuilder owning this stack. - - The constraint. - - - - Pops this topmost constrait from the stack. - As a side effect, the constraint's builder - field is set to null. - - - - - - Gets a value indicating whether this is empty. - - true if empty; otherwise, false. - - - - Gets the topmost constraint without modifying the stack. - - The topmost constraint - - - - ConstraintExpression represents a compound constraint in the - process of being constructed from a series of syntactic elements. - - Individual elements are appended to the expression as they are - reognized. Once an actual Constraint is appended, the expression - returns a resolvable Constraint. - - - - - ConstraintExpressionBase is the abstract base class for the - ConstraintExpression class, which represents a - compound constraint in the process of being constructed - from a series of syntactic elements. - - NOTE: ConstraintExpressionBase is separate because the - ConstraintExpression class was generated in earlier - versions of NUnit. The two classes may be combined - in a future version. - - - - - The ConstraintBuilder holding the elements recognized so far - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the - class passing in a ConstraintBuilder, which may be pre-populated. - - The builder. - - - - Returns a string representation of the expression as it - currently stands. This should only be used for testing, - since it has the side-effect of resolving the expression. - - - - - - Appends an operator to the expression and returns the - resulting expression itself. - - - - - Appends a self-resolving operator to the expression and - returns a new ResolvableConstraintExpression. - - - - - Appends a constraint to the expression and returns that - constraint, which is associated with the current state - of the expression being built. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the - class passing in a ConstraintBuilder, which may be pre-populated. - - The builder. - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding only if a specified number of them succeed. - - - - - Returns a new PropertyConstraintExpression, which will either - test for the existence of the named property on the object - being tested or apply any following constraint to that property. - - - - - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. - - - - - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. - - - - - Returns the constraint provided as an argument - used to allow custom - custom constraints to easily participate in the syntax. - - - - - Returns the constraint provided as an argument - used to allow custom - custom constraints to easily participate in the syntax. - - - - - Returns a constraint that tests two items for equality - - - - - Returns a constraint that tests that two references are the same object - - - - - Returns a constraint that tests whether the - actual value is greater than the suppled argument - - - - - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument - - - - - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument - - - - - Returns a constraint that tests whether the - actual value is less than the suppled argument - - - - - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument - - - - - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument - - - - - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. - - - - - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is a collection containing the same elements as the - collection supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is a subset of the collection supplied as an argument. - - - - - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. - - - - - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. - - - - - Returns a new ContainsConstraint. This constraint - will, in turn, make use of the appropriate second-level - constraint, depending on the type of the actual argument. - This overload is only used if the item sought is a string, - since any other type implies that we are looking for a - collection member. - - - - - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value matches the regular expression supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value matches the regular expression supplied as an argument. - - - - - Returns a constraint that tests whether the path provided - is the same as an expected path after canonicalization. - - - - - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. - - - - - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. - - - - - Returns a constraint that tests whether the actual value falls - within a specified range. - - - - - Returns a ConstraintExpression that negates any - following constraint. - - - - - Returns a ConstraintExpression that negates any - following constraint. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if at least one of them succeeds. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them fail. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Length property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Count property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Message property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the InnerException property of the object being tested. - - - - - With is currently a NOP - reserved for future use. - - - - - Returns a constraint that tests for null - - - - - Returns a constraint that tests for True - - - - - Returns a constraint that tests for False - - - - - Returns a constraint that tests for a positive value - - - - - Returns a constraint that tests for a negative value - - - - - Returns a constraint that tests for NaN - - - - - Returns a constraint that tests for empty - - - - - Returns a constraint that tests whether a collection - contains all unique items. - - - - - Returns a constraint that tests whether an object graph is serializable in binary format. - - - - - Returns a constraint that tests whether an object graph is serializable in xml format. - - - - - Returns a constraint that tests whether a collection is ordered - - - - - ContainsConstraint tests a whether a string contains a substring - or a collection contains an object. It postpones the decision of - which test to use until the type of the actual argument is known. - This allows testing whether a string is contained in a collection - or as a substring of another string using the same syntax. - - - - - Initializes a new instance of the class. - - The expected. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Flag the constraint to use the supplied IComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied Comparison object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IEqualityComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IEqualityComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to ignore case and return self. - - - - - Applies a delay to the match so that a match can be evaluated in the future. - - - - - Creates a new DelayedConstraint - - The inner constraint two decorate - The time interval after which the match is performed - If the value of is less than 0 - - - - Creates a new DelayedConstraint - - The inner constraint two decorate - The time interval after which the match is performed - The time interval used for polling - If the value of is less than 0 - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for if the base constraint fails, false if it succeeds - - - - Test whether the constraint is satisfied by a delegate - - The delegate whose value is to be tested - True for if the base constraint fails, false if it succeeds - - - - Test whether the constraint is satisfied by a given reference. - Overridden to wait for the specified delay period before - calling the base constraint with the dereferenced value. - - A reference to the value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a MessageWriter. - - The writer on which the actual value is displayed - - - - Returns the string representation of the constraint. - - - - - EmptyCollectionConstraint tests whether a collection is empty. - - - - - Check that the collection is empty - - - - - - - Write the constraint description to a MessageWriter - - - - - - EmptyConstraint tests a whether a string or collection is empty, - postponing the decision about which test is applied until the - type of the actual argument is known. - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - EmptyDirectoryConstraint is used to test that a directory is empty - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. - - The writer on which the actual value is displayed - - - - EmptyStringConstraint tests whether a string is empty. - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - EndsWithConstraint can test whether a string ends - with an expected substring. - - - - - StringConstraint is the abstract base for constraints - that operate on strings. It supports the IgnoreCase - modifier for string operations. - - - - - The expected value - - - - - Indicates whether tests should be case-insensitive - - - - - Constructs a StringConstraint given an expected value - - The expected value - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Test whether the constraint is satisfied by a given string - - The string to be tested - True for success, false for failure - - - - Modify the constraint to ignore case in matching. - - - - - Initializes a new instance of the class. - - The expected string - - - - Test whether the constraint is matched by the actual value. - This is a template method, which calls the IsMatch method - of the derived class. - - - - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - EqualConstraint is able to compare an actual value with the - expected value provided in its constructor. Two objects are - considered equal if both are null, or if both have the same - value. NUnit has special semantics for some object types. - - - - - If true, strings in error messages will be clipped - - - - - NUnitEqualityComparer used to test equality. - - - - - Initializes a new instance of the class. - - The expected value. - - - - Flag the constraint to use a tolerance when determining equality. - - Tolerance value to be used - Self. - - - - Flag the constraint to use the supplied IComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied Comparison object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IEqualityComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IEqualityComparer object. - - The IComparer object to use. - Self. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write a failure message. Overridden to provide custom - failure messages for EqualConstraint. - - The MessageWriter to write to - - - - Write description of this constraint - - The MessageWriter to write to - - - - Display the failure information for two collections that did not match. - - The MessageWriter on which to display - The expected collection. - The actual collection - The depth of this failure in a set of nested collections - - - - Displays a single line showing the types and sizes of the expected - and actual enumerations, collections or arrays. If both are identical, - the value is only shown once. - - The MessageWriter on which to display - The expected collection or array - The actual collection or array - The indentation level for the message line - - - - Displays a single line showing the point in the expected and actual - arrays at which the comparison failed. If the arrays have different - structures or dimensions, both values are shown. - - The MessageWriter on which to display - The expected array - The actual array - Index of the failure point in the underlying collections - The indentation level for the message line - - - - Display the failure information for two IEnumerables that did not match. - - The MessageWriter on which to display - The expected enumeration. - The actual enumeration - The depth of this failure in a set of nested collections - - - - Flag the constraint to ignore case and return self. - - - - - Flag the constraint to suppress string clipping - and return self. - - - - - Flag the constraint to compare arrays as collections - and return self. - - - - - Switches the .Within() modifier to interpret its tolerance as - a distance in representable values (see remarks). - - Self. - - Ulp stands for "unit in the last place" and describes the minimum - amount a given value can change. For any integers, an ulp is 1 whole - digit. For floating point values, the accuracy of which is better - for smaller numbers and worse for larger numbers, an ulp depends - on the size of the number. Using ulps for comparison of floating - point results instead of fixed tolerances is safer because it will - automatically compensate for the added inaccuracy of larger numbers. - - - - - Switches the .Within() modifier to interpret its tolerance as - a percentage that the actual values is allowed to deviate from - the expected value. - - Self - - - - Causes the tolerance to be interpreted as a TimeSpan in days. - - Self - - - - Causes the tolerance to be interpreted as a TimeSpan in hours. - - Self - - - - Causes the tolerance to be interpreted as a TimeSpan in minutes. - - Self - - - - Causes the tolerance to be interpreted as a TimeSpan in seconds. - - Self - - - - Causes the tolerance to be interpreted as a TimeSpan in milliseconds. - - Self - - - - Causes the tolerance to be interpreted as a TimeSpan in clock ticks. - - Self - - - - EqualityAdapter class handles all equality comparisons - that use an IEqualityComparer, IEqualityComparer<T> - or a ComparisonAdapter. - - - - - Compares two objects, returning true if they are equal - - - - - Returns true if the two objects can be compared by this adapter. - The base adapter cannot handle IEnumerables except for strings. - - - - - Returns an EqualityAdapter that wraps an IComparer. - - - - - Returns an EqualityAdapter that wraps an IEqualityComparer. - - - - - Returns an EqualityAdapter that wraps an IEqualityComparer<T>. - - - - - Returns an EqualityAdapter that wraps an IComparer<T>. - - - - - Returns an EqualityAdapter that wraps a Comparison<T>. - - - - - EqualityAdapter that wraps an IComparer. - - - - - Returns true if the two objects can be compared by this adapter. - Generic adapter requires objects of the specified type. - - - - - EqualityAdapter that wraps an IComparer. - - - - - EqualityAdapterList represents a list of EqualityAdapters - in a common class across platforms. - - - - - ExactCountConstraint applies another constraint to each - item in a collection, succeeding only if a specified - number of items succeed. - - - - - Construct an ExactCountConstraint on top of an existing constraint - - - - - - - Apply the item constraint to each item in the collection, - succeeding only if the expected number of items pass. - - - - - - - Write a description of this constraint to a MessageWriter - - - - - - ExactTypeConstraint is used to test that an object - is of the exact type provided in the constructor - - - - - Construct an ExactTypeConstraint for a given Type - - The expected Type. - - - - Test that an object is of the exact type specified - - The actual value. - True if the tested object is of the exact type provided, otherwise false. - - - - Write the description of this constraint to a MessageWriter - - The MessageWriter to use - - - - ExceptionTypeConstraint is a special version of ExactTypeConstraint - used to provided detailed info about the exception thrown in - an error message. - - - - - Constructs an ExceptionTypeConstraint - - - - - Write the actual value for a failing constraint test to a - MessageWriter. Overriden to write additional information - in the case of an Exception. - - The MessageWriter to use - - - - FailurePoint class represents one point of failure - in an equality test. - - - - - The location of the failure - - - - - The expected value - - - - - The actual value - - - - - Indicates whether the expected value is valid - - - - - Indicates whether the actual value is valid - - - - - FailurePointList represents a set of FailurePoints - in a cross-platform way. - - - - - FalseConstraint tests that the actual value is false - - - - - Initializes a new instance of the class. - - - - Helper routines for working with floating point numbers - - - The floating point comparison code is based on this excellent article: - http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm - - - "ULP" means Unit in the Last Place and in the context of this library refers to - the distance between two adjacent floating point numbers. IEEE floating point - numbers can only represent a finite subset of natural numbers, with greater - accuracy for smaller numbers and lower accuracy for very large numbers. - - - If a comparison is allowed "2 ulps" of deviation, that means the values are - allowed to deviate by up to 2 adjacent floating point values, which might be - as low as 0.0000001 for small numbers or as high as 10.0 for large numbers. - - - - - Compares two floating point values for equality - First floating point value to be compared - Second floating point value t be compared - - Maximum number of representable floating point values that are allowed to - be between the left and the right floating point values - - True if both numbers are equal or close to being equal - - - Floating point values can only represent a finite subset of natural numbers. - For example, the values 2.00000000 and 2.00000024 can be stored in a float, - but nothing inbetween them. - - - This comparison will count how many possible floating point values are between - the left and the right number. If the number of possible values between both - numbers is less than or equal to maxUlps, then the numbers are considered as - being equal. - - - Implementation partially follows the code outlined here: - http://www.anttirt.net/2007/08/19/proper-floating-point-comparisons/ - - - - - Compares two double precision floating point values for equality - First double precision floating point value to be compared - Second double precision floating point value t be compared - - Maximum number of representable double precision floating point values that are - allowed to be between the left and the right double precision floating point values - - True if both numbers are equal or close to being equal - - - Double precision floating point values can only represent a limited series of - natural numbers. For example, the values 2.0000000000000000 and 2.0000000000000004 - can be stored in a double, but nothing inbetween them. - - - This comparison will count how many possible double precision floating point - values are between the left and the right number. If the number of possible - values between both numbers is less than or equal to maxUlps, then the numbers - are considered as being equal. - - - Implementation partially follows the code outlined here: - http://www.anttirt.net/2007/08/19/proper-floating-point-comparisons/ - - - - - - Reinterprets the memory contents of a floating point value as an integer value - - - Floating point value whose memory contents to reinterpret - - - The memory contents of the floating point value interpreted as an integer - - - - - Reinterprets the memory contents of a double precision floating point - value as an integer value - - - Double precision floating point value whose memory contents to reinterpret - - - The memory contents of the double precision floating point value - interpreted as an integer - - - - - Reinterprets the memory contents of an integer as a floating point value - - Integer value whose memory contents to reinterpret - - The memory contents of the integer value interpreted as a floating point value - - - - - Reinterprets the memory contents of an integer value as a double precision - floating point value - - Integer whose memory contents to reinterpret - - The memory contents of the integer interpreted as a double precision - floating point value - - - - Union of a floating point variable and an integer - - - The union's value as a floating point variable - - - The union's value as an integer - - - The union's value as an unsigned integer - - - Union of a double precision floating point variable and a long - - - The union's value as a double precision floating point variable - - - The union's value as a long - - - The union's value as an unsigned long - - - - Tests whether a value is greater than the value supplied to its constructor - - - - - The value against which a comparison is to be made - - - - - Initializes a new instance of the class. - - The expected value. - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Tests whether a value is greater than or equal to the value supplied to its constructor - - - - - The value against which a comparison is to be made - - - - - Initializes a new instance of the class. - - The expected value. - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - InstanceOfTypeConstraint is used to test that an object - is of the same type provided or derived from it. - - - - - Construct an InstanceOfTypeConstraint for the type provided - - The expected Type - - - - Test whether an object is of the specified type or a derived type - - The object to be tested - True if the object is of the provided type or derives from it, otherwise false. - - - - Write a description of this constraint to a MessageWriter - - The MessageWriter to use - - - - Tests whether a value is less than the value supplied to its constructor - - - - - The value against which a comparison is to be made - - - - - Initializes a new instance of the class. - - The expected value. - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Tests whether a value is less than or equal to the value supplied to its constructor - - - - - The value against which a comparison is to be made - - - - - Initializes a new instance of the class. - - The expected value. - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Static methods used in creating messages - - - - - Static string used when strings are clipped - - - - - Returns the representation of a type as used in NUnitLite. - This is the same as Type.ToString() except for arrays, - which are displayed with their declared sizes. - - - - - - - Converts any control characters in a string - to their escaped representation. - - The string to be converted - The converted string - - - - Return the a string representation for a set of indices into an array - - Array of indices for which a string is needed - - - - Get an array of indices representing the point in a enumerable, - collection or array corresponding to a single int index into the - collection. - - The collection to which the indices apply - Index in the collection - Array of indices - - - - Clip a string to a given length, starting at a particular offset, returning the clipped - string with ellipses representing the removed parts - - The string to be clipped - The maximum permitted length of the result string - The point at which to start clipping - The clipped string - - - - Clip the expected and actual strings in a coordinated fashion, - so that they may be displayed together. - - - - - - - - - Shows the position two strings start to differ. Comparison - starts at the start index. - - The expected string - The actual string - The index in the strings at which comparison should start - Boolean indicating whether case should be ignored - -1 if no mismatch found, or the index where mismatch found - - - - NaNConstraint tests that the actual value is a double or float NaN - - - - - Test that the actual value is an NaN - - - - - - - Write the constraint description to a specified writer - - - - - - NoItemConstraint applies another constraint to each - item in a collection, failing if any of them succeeds. - - - - - Construct a NoItemConstraint on top of an existing constraint - - - - - - Apply the item constraint to each item in the collection, - failing if any item fails. - - - - - - - Write a description of this constraint to a MessageWriter - - - - - - NotConstraint negates the effect of some other constraint - - - - - Initializes a new instance of the class. - - The base constraint to be negated. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for if the base constraint fails, false if it succeeds - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a MessageWriter. - - The writer on which the actual value is displayed - - - - NullConstraint tests that the actual value is null - - - - - Initializes a new instance of the class. - - - - - NullEmptyStringConstraint tests whether a string is either null or empty. - - - - - Constructs a new NullOrEmptyStringConstraint - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - The Numerics class contains common operations on numeric values. - - - - - Checks the type of the object, returning true if - the object is a numeric type. - - The object to check - true if the object is a numeric type - - - - Checks the type of the object, returning true if - the object is a floating point numeric type. - - The object to check - true if the object is a floating point numeric type - - - - Checks the type of the object, returning true if - the object is a fixed point numeric type. - - The object to check - true if the object is a fixed point numeric type - - - - Test two numeric values for equality, performing the usual numeric - conversions and using a provided or default tolerance. If the tolerance - provided is Empty, this method may set it to a default tolerance. - - The expected value - The actual value - A reference to the tolerance in effect - True if the values are equal - - - - Compare two numeric values, performing the usual numeric conversions. - - The expected value - The actual value - The relationship of the values to each other - - - - NUnitComparer encapsulates NUnit's default behavior - in comparing two objects. - - - - - Compares two objects - - - - - - - - Returns the default NUnitComparer. - - - - - Generic version of NUnitComparer - - - - - - Compare two objects of the same type - - - - - NUnitEqualityComparer encapsulates NUnit's handling of - equality tests between objects. - - - - - - - - - - Compares two objects for equality within a tolerance - - The first object to compare - The second object to compare - The tolerance to use in the comparison - - - - - If true, all string comparisons will ignore case - - - - - If true, arrays will be treated as collections, allowing - those of different dimensions to be compared - - - - - Comparison objects used in comparisons for some constraints. - - - - - List of points at which a failure occured. - - - - - RecursionDetector used to check for recursion when - evaluating self-referencing enumerables. - - - - - Compares two objects for equality within a tolerance, setting - the tolerance to the actual tolerance used if an empty - tolerance is supplied. - - - - - Helper method to compare two arrays - - - - - Method to compare two DirectoryInfo objects - - first directory to compare - second directory to compare - true if equivalent, false if not - - - - Returns the default NUnitEqualityComparer - - - - - Gets and sets a flag indicating whether case should - be ignored in determining equality. - - - - - Gets and sets a flag indicating that arrays should be - compared as collections, without regard to their shape. - - - - - Gets the list of external comparers to be used to - test for equality. They are applied to members of - collections, in place of NUnit's own logic. - - - - - Gets the list of failure points for the last Match performed. - The list consists of objects to be interpreted by the caller. - This generally means that the caller may only make use of - objects it has placed on the list at a particular depthy. - - - - - RecursionDetector detects when a comparison - between two enumerables has reached a point - where the same objects that were previously - compared are again being compared. This allows - the caller to stop the comparison if desired. - - - - - Check whether two objects have previously - been compared, returning true if they have. - The two objects are remembered, so that a - second call will always return true. - - - - - OrConstraint succeeds if either member succeeds - - - - - Create an OrConstraint from two other constraints - - The first constraint - The second constraint - - - - Apply the member constraints to an actual value, succeeding - succeeding as soon as one of them succeeds. - - The actual value - True if either constraint succeeded - - - - Write a description for this contraint to a MessageWriter - - The MessageWriter to receive the description - - - - PathConstraint serves as the abstract base of constraints - that operate on paths and provides several helper methods. - - - - - The expected path used in the constraint - - - - - Flag indicating whether a caseInsensitive comparison should be made - - - - - Construct a PathConstraint for a give expected path - - The expected path - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Returns true if the expected path and actual path match - - - - - Returns the string representation of this constraint - - - - - Transform the provided path to its canonical form so that it - may be more easily be compared with other paths. - - The original path - The path in canonical form - - - - Test whether one path in canonical form is under another. - - The first path - supposed to be the parent path - The second path - supposed to be the child path - Indicates whether case should be ignored - - - - - Modifies the current instance to be case-insensitve - and returns it. - - - - - Modifies the current instance to be case-sensitve - and returns it. - - - - - Predicate constraint wraps a Predicate in a constraint, - returning success if the predicate is true. - - - - - Construct a PredicateConstraint from a predicate - - - - - Determines whether the predicate succeeds when applied - to the actual value. - - - - - Writes the description to a MessageWriter - - - - - PropertyConstraint extracts a named property and uses - its value as the actual value for a chained constraint. - - - - - Initializes a new instance of the class. - - The name. - The constraint to apply to the property. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. - - The writer on which the actual value is displayed - - - - Returns the string representation of the constraint. - - - - - - PropertyExistsConstraint tests that a named property - exists on the object provided through Match. - - Originally, PropertyConstraint provided this feature - in addition to making optional tests on the vaue - of the property. The two constraints are now separate. - - - - - Initializes a new instance of the class. - - The name of the property. - - - - Test whether the property exists for a given object - - The object to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a - MessageWriter. - - The writer on which the actual value is displayed - - - - Returns the string representation of the constraint. - - - - - - RangeConstraint tests whether two values are within a - specified range. - - - - - Initializes a new instance of the class. - - From. - To. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - RegexConstraint can test whether a string matches - the pattern provided. - - - - - Initializes a new instance of the class. - - The pattern. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - ResolvableConstraintExpression is used to represent a compound - constraint being constructed at a point where the last operator - may either terminate the expression or may have additional - qualifying constraints added to it. - - It is used, for example, for a Property element or for - an Exception element, either of which may be optionally - followed by constraints that apply to the property or - exception. - - - - - Create a new instance of ResolvableConstraintExpression - - - - - Create a new instance of ResolvableConstraintExpression, - passing in a pre-populated ConstraintBuilder. - - - - - Resolve the current expression to a Constraint - - - - - This operator creates a constraint that is satisfied only if both - argument constraints are satisfied. - - - - - This operator creates a constraint that is satisfied only if both - argument constraints are satisfied. - - - - - This operator creates a constraint that is satisfied only if both - argument constraints are satisfied. - - - - - This operator creates a constraint that is satisfied if either - of the argument constraints is satisfied. - - - - - This operator creates a constraint that is satisfied if either - of the argument constraints is satisfied. - - - - - This operator creates a constraint that is satisfied if either - of the argument constraints is satisfied. - - - - - This operator creates a constraint that is satisfied if the - argument constraint is not satisfied. - - - - - Appends an And Operator to the expression - - - - - Appends an Or operator to the expression. - - - - - ReusableConstraint wraps a constraint expression after - resolving it so that it can be reused consistently. - - - - - Construct a ReusableConstraint from a constraint expression - - The expression to be resolved and reused - - - - Converts a constraint to a ReusableConstraint - - The constraint to be converted - A ReusableConstraint - - - - Returns the string representation of the constraint. - - A string representing the constraint - - - - Resolves the ReusableConstraint by returning the constraint - that it originally wrapped. - - A resolved constraint - - - - SameAsConstraint tests whether an object is identical to - the object passed to its constructor - - - - - Initializes a new instance of the class. - - The expected object. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Summary description for SamePathConstraint. - - - - - Initializes a new instance of the class. - - The expected path - - - - Test whether the constraint is satisfied by a given value - - The expected path - The actual path - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - SamePathOrUnderConstraint tests that one path is under another - - - - - Initializes a new instance of the class. - - The expected path - - - - Test whether the constraint is satisfied by a given value - - The expected path - The actual path - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - SomeItemsConstraint applies another constraint to each - item in a collection, succeeding if any of them succeeds. - - - - - Construct a SomeItemsConstraint on top of an existing constraint - - - - - - Apply the item constraint to each item in the collection, - succeeding if any item succeeds. - - - - - - - Write a description of this constraint to a MessageWriter - - - - - - StartsWithConstraint can test whether a string starts - with an expected substring. - - - - - Initializes a new instance of the class. - - The expected string - - - - Test whether the constraint is matched by the actual value. - This is a template method, which calls the IsMatch method - of the derived class. - - - - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - SubPathConstraint tests that the actual path is under the expected path - - - - - Initializes a new instance of the class. - - The expected path - - - - Test whether the constraint is satisfied by a given value - - The expected path - The actual path - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - SubstringConstraint can test whether a string contains - the expected substring. - - - - - Initializes a new instance of the class. - - The expected. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - ThrowsConstraint is used to test the exception thrown by - a delegate by applying a constraint to it. - - - - - Initializes a new instance of the class, - using a constraint to be applied to the exception. - - A constraint to apply to the caught exception. - - - - Executes the code of the delegate and captures any exception. - If a non-null base constraint was provided, it applies that - constraint to the exception. - - A delegate representing the code to be tested - True if an exception is thrown and the constraint succeeds, otherwise false - - - - Converts an ActualValueDelegate to a TestDelegate - before calling the primary overload. - - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. - - The writer on which the actual value is displayed - - - - Returns the string representation of this constraint - - - - - Get the actual exception thrown - used by Assert.Throws. - - - - - ThrowsNothingConstraint tests that a delegate does not - throw an exception. - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True if no exception is thrown, otherwise false - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a - MessageWriter. Overridden in ThrowsNothingConstraint to write - information about the exception that was actually caught. - - The writer on which the actual value is displayed - - - - The Tolerance class generalizes the notion of a tolerance - within which an equality test succeeds. Normally, it is - used with numeric types, but it can be used with any - type that supports taking a difference between two - objects and comparing that difference to a value. - - - - - Constructs a linear tolerance of a specdified amount - - - - - Constructs a tolerance given an amount and ToleranceMode - - - - - Tests that the current Tolerance is linear with a - numeric value, throwing an exception if it is not. - - - - - Returns an empty Tolerance object, equivalent to - specifying no tolerance. In most cases, it results - in an exact match but for floats and doubles a - default tolerance may be used. - - - - - Returns a zero Tolerance object, equivalent to - specifying an exact match. - - - - - Gets the ToleranceMode for the current Tolerance - - - - - Gets the value of the current Tolerance instance. - - - - - Returns a new tolerance, using the current amount as a percentage. - - - - - Returns a new tolerance, using the current amount in Ulps. - - - - - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of days. - - - - - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of hours. - - - - - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of minutes. - - - - - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of seconds. - - - - - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of milliseconds. - - - - - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of clock ticks. - - - - - Returns true if the current tolerance is empty. - - - - - Modes in which the tolerance value for a comparison can be interpreted. - - - - - The tolerance was created with a value, without specifying - how the value would be used. This is used to prevent setting - the mode more than once and is generally changed to Linear - upon execution of the test. - - - - - The tolerance is used as a numeric range within which - two compared values are considered to be equal. - - - - - Interprets the tolerance as the percentage by which - the two compared values my deviate from each other. - - - - - Compares two values based in their distance in - representable numbers. - - - - - TrueConstraint tests that the actual value is true - - - - - Initializes a new instance of the class. - - - - - UniqueItemsConstraint tests whether all the items in a - collection are unique. - - - - - Check that all items are unique. - - - - - - - Write a description of this constraint to a MessageWriter - - - - - - XmlSerializableConstraint tests whether - an object is serializable in XML format. - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. - - The writer on which the actual value is displayed - - - - Returns the string representation of this constraint - - - - - Represents a constraint that succeeds if all the - members of a collection match a base constraint. - - - - - Abstract base for operators that indicate how to - apply a constraint to items in a collection. - - - - - PrefixOperator takes a single constraint and modifies - it's action in some way. - - - - - The ConstraintOperator class is used internally by a - ConstraintBuilder to represent an operator that - modifies or combines constraints. - - Constraint operators use left and right precedence - values to determine whether the top operator on the - stack should be reduced before pushing a new operator. - - - - - The precedence value used when the operator - is about to be pushed to the stack. - - - - - The precedence value used when the operator - is on the top of the stack. - - - - - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. - - - - - - The syntax element preceding this operator - - - - - The syntax element folowing this operator - - - - - The precedence value used when the operator - is about to be pushed to the stack. - - - - - The precedence value used when the operator - is on the top of the stack. - - - - - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. - - - - - - Returns the constraint created by applying this - prefix to another constraint. - - - - - - - Constructs a CollectionOperator - - - - - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - they all succeed. - - - - - Operator that requires both it's arguments to succeed - - - - - Abstract base class for all binary operators - - - - - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. - - - - - - Abstract method that produces a constraint by applying - the operator to its left and right constraint arguments. - - - - - Gets the left precedence of the operator - - - - - Gets the right precedence of the operator - - - - - Construct an AndOperator - - - - - Apply the operator to produce an AndConstraint - - - - - Operator that tests for the presence of a particular attribute - on a type and optionally applies further tests to the attribute. - - - - - Abstract base class for operators that are able to reduce to a - constraint whether or not another syntactic element follows. - - - - - Construct an AttributeOperator for a particular Type - - The Type of attribute tested - - - - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. - - - - - Represents a constraint that succeeds if the specified - count of members of a collection match a base constraint. - - - - - Construct an ExactCountOperator for a specified count - - The expected count - - - - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - none of them succeed. - - - - - Represents a constraint that succeeds if none of the - members of a collection match a base constraint. - - - - - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - none of them succeed. - - - - - Negates the test of the constraint it wraps. - - - - - Constructs a new NotOperator - - - - - Returns a NotConstraint applied to its argument. - - - - - Operator that requires at least one of it's arguments to succeed - - - - - Construct an OrOperator - - - - - Apply the operator to produce an OrConstraint - - - - - Operator used to test for the presence of a named Property - on an object and optionally apply further tests to the - value of that property. - - - - - Constructs a PropOperator for a particular named property - - - - - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. - - - - - - Gets the name of the property to which the operator applies - - - - - Represents a constraint that succeeds if any of the - members of a collection match a base constraint. - - - - - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - any of them succeed. - - - - - Operator that tests that an exception is thrown and - optionally applies further tests to the exception. - - - - - Construct a ThrowsOperator - - - - - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. - - - - - Represents a constraint that simply wraps the - constraint provided as an argument, without any - further functionality, but which modifes the - order of evaluation because of its precedence. - - - - - Constructor for the WithOperator - - - - - Returns a constraint that wraps its argument - - - - - Thrown when an assertion failed. - - - - The error message that explains - the reason for the exception - - - The error message that explains - the reason for the exception - The exception that caused the - current exception - - - - Serialization Constructor - - - - - Thrown when an assertion failed. - - - - - - - The error message that explains - the reason for the exception - The exception that caused the - current exception - - - - Serialization Constructor - - - - - Thrown when a test executes inconclusively. - - - - The error message that explains - the reason for the exception - - - The error message that explains - the reason for the exception - The exception that caused the - current exception - - - - Serialization Constructor - - - - - Thrown when an assertion failed. - - - - - - - The error message that explains - the reason for the exception - The exception that caused the - current exception - - - - Serialization Constructor - - - - - - - - - - - Compares two objects of a given Type for equality within a tolerance - - The first object to compare - The second object to compare - The tolerance to use in the comparison - - - - diff --git a/fNbt.Serialization.Test/DynamicConverterTests.cs b/fNbt.Serialization.Test/DynamicConverterTests.cs index aeed7c3..c747b0d 100644 --- a/fNbt.Serialization.Test/DynamicConverterTests.cs +++ b/fNbt.Serialization.Test/DynamicConverterTests.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using NUnit.Framework; +using NUnit.Framework; namespace fNbt.Serialization.Test { [TestFixture] diff --git a/fNbt.Serialization.Test/Properties/AssemblyInfo.cs b/fNbt.Serialization.Test/Properties/AssemblyInfo.cs deleted file mode 100644 index 4f6e7c2..0000000 --- a/fNbt.Serialization.Test/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("fNbt.Serialization.Test")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("fNbt.Serialization.Test")] -[assembly: AssemblyCopyright("Copyright © 2015")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("9e87af7b-61c3-4b47-96f1-3daed67cb536")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/fNbt.Serialization.Test/fNbt.Serialization.Test.csproj b/fNbt.Serialization.Test/fNbt.Serialization.Test.csproj index 6a757c8..7c7db40 100644 --- a/fNbt.Serialization.Test/fNbt.Serialization.Test.csproj +++ b/fNbt.Serialization.Test/fNbt.Serialization.Test.csproj @@ -1,66 +1,23 @@ - - - - - Debug - AnyCPU - {1A9A2746-62D1-49E6-80EF-FC3305A1CFE0} - Library - Properties - fNbt.Serialization.Test - fNbt.Serialization.Test - v4.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\Dependencies\nunit.framework.dll - - - - - - - - - - - - - - - - {95238d45-ec60-419f-90e1-7064ea738079} - fNbt.Serialization - - - {4488498d-976d-4da3-bf72-109531af0488} - fNbt - - - - - \ No newline at end of file + + + + net6.0; netcoreapp3.1; netstandard2.1 + false + + + + + + + + + + + + + + + + + + diff --git a/fNbt.Serialization/Properties/AssemblyInfo.cs b/fNbt.Serialization/Properties/AssemblyInfo.cs deleted file mode 100644 index 948e97d..0000000 --- a/fNbt.Serialization/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("fNbt.Serialization")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("fNbt.Serialization")] -[assembly: AssemblyCopyright("Copyright © 2014")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("825eb1f2-5bfc-4d51-9e5e-a519928bccca")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/fNbt.Serialization/fNbt.Serialization.csproj b/fNbt.Serialization/fNbt.Serialization.csproj index 213dbae..e6954b0 100644 --- a/fNbt.Serialization/fNbt.Serialization.csproj +++ b/fNbt.Serialization/fNbt.Serialization.csproj @@ -1,77 +1,41 @@ - - - - - Debug - AnyCPU - {95238D45-EC60-419F-90E1-7064EA738079} - Library - Properties - fNbt.Serialization - fNbt.Serialization - v4.0 - 512 - Client - - - true - full - false - ..\bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - ..\bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {4488498d-976d-4da3-bf72-109531af0488} - fNbt - - - - - \ No newline at end of file + + + + net6.0; netcoreapp3.1; netstandard2.1 + true + + true + MiNET.fNbt.Serialization + 0.0.0 + kennyvv + Kenny van Vulpen + fNbt Serialization + 2010-2011 Erik Davidson; 2012-2015 Matvei Stefarov; 2016-2018 Niclas Olofsson; 2022 Kenny van Vulpen + https://github.com/NiclasOlofsson/fNbt/blob/master/docs/LICENSE + https://github.com/NiclasOlofsson/fNbt + https://github.com/NiclasOlofsson/fNbt + + MiNET fnbt nbt MCPE varint and string + 1.0.0.0 + 1.0.0.0 + + + + + latest + 1701;1702;1701 + + + + + + + + + + + + + + + diff --git a/fNbt.Test/NbtSerializerTests.cs b/fNbt.Test/NbtSerializerTests.cs new file mode 100644 index 0000000..1fdfcae --- /dev/null +++ b/fNbt.Test/NbtSerializerTests.cs @@ -0,0 +1,208 @@ +using fNbt.Serialization; +using NUnit.Framework; +using System; +using System.Collections.Generic; + +namespace fNbt.Test +{ + [TestFixture] + public sealed class NbtSerializerTests + { + [Test] + public void BuildFromTagTest() + { + CheckFromTag(false); + } + + [Test] + public void FillFromTagTest() + { + CheckFromTag(true); + } + + [Test] + public void FillTest() + { + var valuesSet = new List() { "testVal1", "test_val_2", "TestVal3", "TEST_VAL_4" }; + + var original = new FillTestClass(); + original.GetOnlyTestStringList.AddRange(valuesSet); + original.GetOnlyTestClassProperty.EasyIntProperty = 321; + original.GetOnlyTestClassProperty.EasyStringProperty = "ESP_TEST_FILL"; + + var tag = NbtSerializer.SerializeObject(original); + + var result = NbtSerializer.DeserializeObject(tag); + + Assert.IsNotNull(result); + + Assert.AreEqual(original.GetOnlyTestClassProperty.EasyIntProperty, result.GetOnlyTestClassProperty.EasyIntProperty); + Assert.AreEqual(original.GetOnlyTestClassProperty.EasyStringProperty, result.GetOnlyTestClassProperty.EasyStringProperty); + CollectionAssert.AreEquivalent(original.GetOnlyTestStringList, result.GetOnlyTestStringList); + } + + [Test] + public void FieldsAndPropertiesTest() + { + var raw = new FieldsAndPropertiesTestClass(); + var tag = NbtSerializer.SerializeObject(raw); + + Assert.IsNotNull(tag); + + Assert.IsFalse(tag.Contains(nameof(raw.HidenTestIntFiled))); + Assert.IsFalse(tag.Contains(nameof(raw.HidenDefaultTestIntFiled))); + + Assert.IsFalse(tag.Contains(nameof(raw.HidenTestIntProperty))); + Assert.IsFalse(tag.Contains(nameof(raw.HidenDefaultTestIntProperty))); + + AssertTagValue(tag, nameof(raw.DefaultTestIntFiled), raw.DefaultTestIntFiled, t => t.Value); + AssertTagValue(tag, nameof(raw.TestIntFiled), raw.TestIntFiled, t => t.Value); + AssertTagValue(tag, "PrivateTestIntFiled", 3, t => t.Value); + AssertTagValue(tag, FieldsAndPropertiesTestClass.NameForNamedTestIndFiled, raw.NamedTestIntFiled, t => t.Value); + + AssertTagValue(tag, nameof(raw.DefaultTestIntProperty), raw.DefaultTestIntProperty, t => t.Value); + AssertTagValue(tag, nameof(raw.TestIntProperty), raw.TestIntProperty, t => t.Value); + AssertTagValue(tag, nameof(raw.OnlyGetTestIntProperty), raw.OnlyGetTestIntProperty, t => t.Value); + AssertTagValue(tag, "PrivateTestIntProperty", 8, t => t.Value); + AssertTagValue(tag, FieldsAndPropertiesTestClass.NameForNamedTestIndProperty, raw.NamedTestIntProperty, t => t.Value); + } + + [Test] + public void TypesTest() + { + var raw = new TypesTestClass(); + var tag = NbtSerializer.SerializeObject(raw); + var deserialized = NbtSerializer.DeserializeObject(tag); + + Assert.IsNotNull(tag); + + Assert.AreEqual(raw.BoolFalseTestProperty, deserialized.BoolFalseTestProperty); + Assert.AreEqual(raw.BoolTrueTestProperty, deserialized.BoolTrueTestProperty); + Assert.AreEqual(raw.ByteArrayTestProperty, deserialized.ByteArrayTestProperty); + Assert.AreEqual(raw.IntArrayTestProperty, deserialized.IntArrayTestProperty); + Assert.AreEqual(raw.ByteTestProperty, deserialized.ByteTestProperty); + Assert.AreEqual(raw.SByteTestProperty, deserialized.SByteTestProperty); + Assert.AreEqual(raw.ShortTestProperty, deserialized.ShortTestProperty); + Assert.AreEqual(raw.UShortTestProperty, deserialized.UShortTestProperty); + Assert.AreEqual(raw.IntTestProperty, deserialized.IntTestProperty); + Assert.AreEqual(raw.UIntTestProperty, deserialized.UIntTestProperty); + Assert.AreEqual(raw.LongTestProperty, deserialized.LongTestProperty); + Assert.AreEqual(raw.ULongTestProperty, deserialized.ULongTestProperty); + + Assert.AreEqual(raw.NbtIntProperty.Value, deserialized.NbtIntProperty.Value); + + AssertTagValue(tag, nameof(raw.BoolFalseTestProperty), raw.BoolFalseTestProperty, t => Convert.ToBoolean(t.Value)); + AssertTagValue(tag, nameof(raw.BoolTrueTestProperty), raw.BoolTrueTestProperty, t => Convert.ToBoolean(t.Value)); + AssertTagValue(tag, nameof(raw.ByteArrayTestProperty), raw.ByteArrayTestProperty, t => t.Value); + AssertTagValue(tag, nameof(raw.IntArrayTestProperty), raw.IntArrayTestProperty, t => t.Value); + AssertTagValue(tag, nameof(raw.ByteTestProperty), raw.ByteTestProperty, t => t.Value); + AssertTagValue(tag, nameof(raw.SByteTestProperty), raw.SByteTestProperty, t => (sbyte)t.Value); + AssertTagValue(tag, nameof(raw.ShortTestProperty), raw.ShortTestProperty, t => t.Value); + AssertTagValue(tag, nameof(raw.UShortTestProperty), raw.UShortTestProperty, t => (ushort)t.Value); + AssertTagValue(tag, nameof(raw.IntTestProperty), raw.IntTestProperty, t => t.Value); + AssertTagValue(tag, nameof(raw.UIntTestProperty), raw.UIntTestProperty, t => (uint)t.Value); + AssertTagValue(tag, nameof(raw.LongTestProperty), raw.LongTestProperty, t => t.Value); + AssertTagValue(tag, nameof(raw.ULongTestProperty), raw.ULongTestProperty, t => (ulong)t.Value); + + AssertTagValue(tag, nameof(raw.NbtIntProperty), raw.NbtIntProperty.Value, t => t.Value); + } + + private void CheckFromTag(bool fill) + { + var stringValue = "test_string_value_rv"; + var intValue = 882882; + + var shadow = new EasyTestClass(); + + var tag = new NbtCompound(); + tag.Add(new NbtString(nameof(shadow.EasyStringProperty), stringValue)); + tag.Add(new NbtInt(nameof(shadow.EasyIntProperty), intValue)); + + EasyTestClass result = null; + + if (fill) + { + result = shadow; + NbtSerializer.FillObject(result, tag); + } + else + { + result = NbtSerializer.DeserializeObject(tag); + } + + Assert.IsNotNull(result); + + Assert.AreEqual(stringValue, result.EasyStringProperty); + Assert.AreEqual(intValue, result.EasyIntProperty); + } + + private void AssertTagValue(NbtCompound parentTag, string expectedTagName, object expectedValue, Func getValue) where TExpected : NbtTag + { + Assert.True(parentTag.TryGet(expectedTagName, out NbtTag tag), + $"expected tag [{expectedTagName}] is not contains."); + + Assert.IsAssignableFrom(tag, + $"actual tag type is [{tag.GetType()}], but expected [{typeof(TExpected)}]"); + + var actual = getValue((TExpected)tag); + Assert.AreEqual(expectedValue, actual); + } + + #region test classes + + public class FillTestClass + { + [NbtProperty] public List GetOnlyTestStringList { get; } = new List(); + [NbtProperty] public EasyTestClass GetOnlyTestClassProperty { get; } = new EasyTestClass(); + } + + public class EasyTestClass + { + [NbtProperty] public string EasyStringProperty { get; set; } = "easy property value"; + [NbtProperty] public int EasyIntProperty { get; set; } = 123456789; + } + + public class TypesTestClass + { + [NbtProperty(hideDefault: false)] public bool BoolFalseTestProperty { get; set; } = false; + [NbtProperty] public bool BoolTrueTestProperty { get; set; } = true; + [NbtProperty] public byte[] ByteArrayTestProperty { get; set; } = new byte[] { 1, 2, 3, 4 }; + [NbtProperty] public int[] IntArrayTestProperty { get; set; } = new int[] { 5, 6, 7, 8 }; + [NbtProperty] public byte ByteTestProperty { get; set; } = 1; + [NbtProperty] public sbyte SByteTestProperty { get; set; } = 2; + [NbtProperty] public short ShortTestProperty { get; set; } = 3; + [NbtProperty] public ushort UShortTestProperty { get; set; } = 4; + [NbtProperty] public int IntTestProperty { get; set; } = 5; + [NbtProperty] public uint UIntTestProperty { get; set; } = 6; + [NbtProperty] public ulong LongTestProperty { get; set; } = 7; + [NbtProperty] public ulong ULongTestProperty { get; set; } = 8; + + [NbtProperty] public NbtInt NbtIntProperty { get; set; } = new NbtInt(100); + } + + public class FieldsAndPropertiesTestClass + { + public int HidenTestIntFiled = 1; + [NbtProperty] public int HidenDefaultTestIntFiled = 0; + [NbtProperty(hideDefault: false)] public int DefaultTestIntFiled = 0; + [NbtProperty] public int TestIntFiled = 2; + + [NbtProperty] private int PrivateTestIntFiled = 3; + + public const string NameForNamedTestIndFiled = "named_test_int_field"; + [NbtProperty(NameForNamedTestIndFiled)] public int NamedTestIntFiled = 4; + + public int HidenTestIntProperty { get; set; } = 5; + [NbtProperty] public int HidenDefaultTestIntProperty { get; set; } = 0; + [NbtProperty(hideDefault: false)] public int DefaultTestIntProperty { get; set; } = 0; + [NbtProperty] public int TestIntProperty { get; set; } = 6; + [NbtProperty] public int OnlyGetTestIntProperty { get; } = 7; + [NbtProperty] private int PrivateTestIntProperty { get; set; } = 8; + + public const string NameForNamedTestIndProperty = "named_test_int_property"; + [NbtProperty(NameForNamedTestIndProperty)] public int NamedTestIntProperty { get; set; } = 9; + } + + #endregion + } +} diff --git a/fNbt.Test/fNbt.Test.csproj b/fNbt.Test/fNbt.Test.csproj index 9c60029..845fef9 100644 --- a/fNbt.Test/fNbt.Test.csproj +++ b/fNbt.Test/fNbt.Test.csproj @@ -1,19 +1,19 @@  - netcoreapp2.1 + net6.0; netcoreapp3.1; netstandard2.1 false - - - + + + - + diff --git a/fNbt.sln b/fNbt.sln index 241276e..89d9c0b 100644 --- a/fNbt.sln +++ b/fNbt.sln @@ -15,9 +15,10 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "fNbt.Test", "fNbt.Test\fNbt.Test.csproj", "{8DD93C35-682E-4C62-9012-EF15C80FFFEA}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Dependencies", "Dependencies", "{DF431E24-9487-434E-B11F-431950FCA573}" - ProjectSection(SolutionItems) = preProject - Dependencies\nunit.framework.dll = Dependencies\nunit.framework.dll - EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "fNbt.Serialization", "fNbt.Serialization\fNbt.Serialization.csproj", "{90BCABD5-6FF0-469F-AEEC-19F7C4137D68}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "fNbt.Serialization.Test", "fNbt.Serialization.Test\fNbt.Serialization.Test.csproj", "{AD9B5CD5-ADF6-49B9-8D0C-EB4EF69E0AF1}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -53,6 +54,30 @@ Global {8DD93C35-682E-4C62-9012-EF15C80FFFEA}.Release|x64.Build.0 = Release|Any CPU {8DD93C35-682E-4C62-9012-EF15C80FFFEA}.Release|x86.ActiveCfg = Release|Any CPU {8DD93C35-682E-4C62-9012-EF15C80FFFEA}.Release|x86.Build.0 = Release|Any CPU + {90BCABD5-6FF0-469F-AEEC-19F7C4137D68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {90BCABD5-6FF0-469F-AEEC-19F7C4137D68}.Debug|Any CPU.Build.0 = Debug|Any CPU + {90BCABD5-6FF0-469F-AEEC-19F7C4137D68}.Debug|x64.ActiveCfg = Debug|Any CPU + {90BCABD5-6FF0-469F-AEEC-19F7C4137D68}.Debug|x64.Build.0 = Debug|Any CPU + {90BCABD5-6FF0-469F-AEEC-19F7C4137D68}.Debug|x86.ActiveCfg = Debug|Any CPU + {90BCABD5-6FF0-469F-AEEC-19F7C4137D68}.Debug|x86.Build.0 = Debug|Any CPU + {90BCABD5-6FF0-469F-AEEC-19F7C4137D68}.Release|Any CPU.ActiveCfg = Release|Any CPU + {90BCABD5-6FF0-469F-AEEC-19F7C4137D68}.Release|Any CPU.Build.0 = Release|Any CPU + {90BCABD5-6FF0-469F-AEEC-19F7C4137D68}.Release|x64.ActiveCfg = Release|Any CPU + {90BCABD5-6FF0-469F-AEEC-19F7C4137D68}.Release|x64.Build.0 = Release|Any CPU + {90BCABD5-6FF0-469F-AEEC-19F7C4137D68}.Release|x86.ActiveCfg = Release|Any CPU + {90BCABD5-6FF0-469F-AEEC-19F7C4137D68}.Release|x86.Build.0 = Release|Any CPU + {AD9B5CD5-ADF6-49B9-8D0C-EB4EF69E0AF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AD9B5CD5-ADF6-49B9-8D0C-EB4EF69E0AF1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AD9B5CD5-ADF6-49B9-8D0C-EB4EF69E0AF1}.Debug|x64.ActiveCfg = Debug|Any CPU + {AD9B5CD5-ADF6-49B9-8D0C-EB4EF69E0AF1}.Debug|x64.Build.0 = Debug|Any CPU + {AD9B5CD5-ADF6-49B9-8D0C-EB4EF69E0AF1}.Debug|x86.ActiveCfg = Debug|Any CPU + {AD9B5CD5-ADF6-49B9-8D0C-EB4EF69E0AF1}.Debug|x86.Build.0 = Debug|Any CPU + {AD9B5CD5-ADF6-49B9-8D0C-EB4EF69E0AF1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AD9B5CD5-ADF6-49B9-8D0C-EB4EF69E0AF1}.Release|Any CPU.Build.0 = Release|Any CPU + {AD9B5CD5-ADF6-49B9-8D0C-EB4EF69E0AF1}.Release|x64.ActiveCfg = Release|Any CPU + {AD9B5CD5-ADF6-49B9-8D0C-EB4EF69E0AF1}.Release|x64.Build.0 = Release|Any CPU + {AD9B5CD5-ADF6-49B9-8D0C-EB4EF69E0AF1}.Release|x86.ActiveCfg = Release|Any CPU + {AD9B5CD5-ADF6-49B9-8D0C-EB4EF69E0AF1}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/fNbt.sln.DotSettings b/fNbt.sln.DotSettings index 94a550e..d6dab1f 100644 --- a/fNbt.sln.DotSettings +++ b/fNbt.sln.DotSettings @@ -165,6 +165,10 @@ <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> <Policy Inspect="True" Prefix="T" Suffix="" Style="AaBb" /> <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> + True + True + True + True True True True diff --git a/fNbt/Serialization/NbtPropertyAttribute.cs b/fNbt/Serialization/NbtPropertyAttribute.cs new file mode 100644 index 0000000..a1be158 --- /dev/null +++ b/fNbt/Serialization/NbtPropertyAttribute.cs @@ -0,0 +1,17 @@ +using System; + +namespace fNbt.Serialization +{ + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] + public class NbtPropertyAttribute : Attribute + { + public string Name { get; } + public bool HideDefault { get; } + + public NbtPropertyAttribute(string name = null, bool hideDefault = true) + { + Name = name; + HideDefault = hideDefault; + } + } +} diff --git a/fNbt/Serialization/NbtSerializer.cs b/fNbt/Serialization/NbtSerializer.cs new file mode 100644 index 0000000..7a55a17 --- /dev/null +++ b/fNbt/Serialization/NbtSerializer.cs @@ -0,0 +1,329 @@ +using System; +using System.Collections; +using System.Linq; +using System.Reflection; + +namespace fNbt.Serialization +{ + /// + /// Basic NBT Serializer implementation provided by https://github.com/DarkLexFirst + /// + public static class NbtSerializer + { + private const BindingFlags MemberBindingFlags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance; + + public static NbtCompound SerializeObject(object value) + { + return (NbtCompound)SerializeChild(null, value); + } + + public static T DeserializeObject(NbtTag tag) + { + return (T)DeserializeChild(typeof(T), tag); + } + + public static void FillObject(T value, NbtTag tag) where T : class + { + FillObject(value, value.GetType(), tag); + } + + private static NbtTag SerializeChild(string name, object value) + { + if (value is NbtTag normalValue) + { + normalValue = (NbtTag)normalValue.Clone(); + normalValue.Name = name; + return normalValue; + } + + var tag = CreateBaseTag(name, value); + if (tag != null) return tag; + + if (value is IList list) + { + return GetNbtList(name, list); + } + else if (value is IDictionary dictionary) + { + return GetNbtCompound(name, dictionary); + } + + var type = value.GetType(); + + var properties = type.GetProperties(MemberBindingFlags); + var fields = type.GetFields(MemberBindingFlags); + + if (properties.Length == 0 && fields.Length == 0) return null; + + var nbt = new NbtCompound(); + if (name != null) nbt.Name = name; + + foreach (var property in properties) + { + var child = SerializeMember(property, property.GetValue(value)); + if (child != null) nbt.Add(child); + } + + foreach (var filed in fields) + { + var child = SerializeMember(filed, filed.GetValue(value)); + if (child != null) nbt.Add(child); + } + + if (nbt.Count == 0) return null; + + return nbt; + } + + private static NbtTag SerializeMember(MemberInfo memberInfo, object value) + { + var attribute = GetAttribute(memberInfo); + if (attribute == null) return null; + + if (attribute.HideDefault && value.Equals(GetDefaultValue(value))) return null; + + string childName = attribute.Name ?? memberInfo.Name; + return SerializeChild(childName, value); + } + + public static object GetDefaultValue(object value) + { + var type = value.GetType(); + + if (type == typeof(byte) || type == typeof(sbyte) || + type == typeof(short) || type == typeof(ushort) || + type == typeof(int) || type == typeof(uint) || + type == typeof(long) || type == typeof(ulong) || + type == typeof(double) || type == typeof(float)) + return 0; + else if (type == typeof(bool)) + return false; + + return null; + } + + private static object DeserializeChild(Type type, NbtTag tag) + { + if (typeof(NbtTag).IsAssignableFrom(type)) + { + tag = (NbtTag)tag.Clone(); + tag.Name = null; + return tag; + } + + var value = GetValueFromTag(tag, type); + if (value != null) return value; + + if (typeof(IList).IsAssignableFrom(type)) + { + return GetList(type, (NbtList)tag); + } + else if (typeof(IDictionary).IsAssignableFrom(type)) + { + return GetDictionary(type, (NbtCompound)tag); + } + + value = Activator.CreateInstance(type); + + DeserializeBase(value, type, tag); + + return value; + } + + private static void DeserializeBase(object value, Type type, NbtTag tag) + { + var compound = (NbtCompound)tag; + + var properties = type.GetProperties(); + var fields = type.GetFields(); + + if (compound.Count == 0) return; + + foreach (var property in properties) + { + if (!TryGetMemberTag(property, compound, out NbtTag child)) continue; + + if (property.SetMethod == null) + { + FillObject(property.GetValue(value), property.PropertyType, child); + continue; + } + + property.SetValue(value, DeserializeChild(property.PropertyType, child)); + } + + foreach (var filed in fields) + { + if (!TryGetMemberTag(filed, compound, out NbtTag child)) continue; + filed.SetValue(value, DeserializeChild(filed.FieldType, child)); + } + } + + private static bool TryGetMemberTag(MemberInfo memberInfo, NbtCompound compound, out NbtTag tag) + { + tag = null; + + var attribute = GetAttribute(memberInfo); + if (attribute == null) return false; + + string childName = attribute.Name ?? memberInfo.Name; + return compound.TryGet(childName, out tag); + } + + private static void FillObject(object value, Type type, NbtTag tag) + { + var baseTypeValue = GetValueFromTag(tag, type); + if (baseTypeValue != null) return; + + if (value is IList list) + { + list.Clear(); + FillList(list, list.GetType(), (NbtList)tag); + return; + } + else if (value is IDictionary dictionary) + { + dictionary.Clear(); + FillDictionary(dictionary, dictionary.GetType(), (NbtCompound)tag); + return; + } + + DeserializeBase(value, type, tag); + } + + private static NbtPropertyAttribute GetAttribute(MemberInfo memberInfo) + { + return memberInfo.GetCustomAttribute(); + } + + private static NbtTag CreateBaseTag(string name, object value) + { + var type = value.GetType(); + + if (type == typeof(byte) || type == typeof(sbyte) || type == typeof(bool)) + return new NbtByte(name, Convert.ToByte(value)); + else if (type == typeof(short) || type == typeof(ushort)) + return new NbtShort(name, Convert.ToInt16(value)); + else if (type == typeof(int) || type == typeof(uint)) + return new NbtInt(name, Convert.ToInt32(value)); + else if (type == typeof(long) || type == typeof(ulong)) + return new NbtLong(name, Convert.ToInt64(value)); + else if (type == typeof(double)) + return new NbtDouble(name, (double)value); + else if (type == typeof(float)) + return new NbtFloat(name, (float)value); + else if (type == typeof(string)) + return new NbtString(name, (string)value); + else if (type == typeof(byte[])) + return new NbtByteArray(name, (byte[])value); + else if (type == typeof(int[])) + return new NbtIntArray(name, (int[])value); + + return null; + } + + private static object GetValueFromTag(NbtTag tag, Type type) + { + switch (tag) + { + case NbtByte _value: + if (type == typeof(bool)) + return Convert.ToBoolean(_value.Value); + else if (type == typeof(sbyte)) + return (sbyte)_value.Value; + return _value.Value; + case NbtShort _value: + if (type == typeof(ushort)) + return (ushort)_value.Value; + return _value.Value; + case NbtInt _value: + if (type == typeof(uint)) + return (uint)_value.Value; + return _value.Value; + case NbtLong _value: + if (type == typeof(ulong)) + return (ulong)_value.Value; + return _value.Value; + case NbtDouble _value: return _value.Value; + case NbtFloat _value: return _value.Value; + case NbtString _value: return _value.Value; + case NbtByteArray _value: return _value.Value; + case NbtIntArray _value: return _value.Value; + default: return null; + }; + } + + private static NbtList GetNbtList(string name, IList list) + { + if (list.Count == 0) return null; + + var nbt = new NbtList(); + if (name != null) nbt.Name = name; + + foreach (var value in list) + { + nbt.Add(SerializeChild(null, value)); + } + + return nbt; + } + + private static IList GetList(Type type, NbtList tag) + { + var list = (IList)Activator.CreateInstance(type); + + FillList(list, type, tag); + return list; + } + + private static void FillList(IList list, Type type, NbtList tag) + { + if (tag.Count == 0) return; + + var listType = type.GetGenericArguments().First(); + + foreach (var child in tag) + { + list.Add(DeserializeChild(listType, child)); + } + } + + private static NbtCompound GetNbtCompound(string name, IDictionary dictionary) + { + if (dictionary.Count == 0) return null; + if (dictionary.GetType().GetGenericArguments().First() != typeof(string)) return null; + + var keys = dictionary.Keys.GetEnumerator(); + var values = dictionary.Values.GetEnumerator(); + + var nbt = new NbtCompound(); + if (name != null) nbt.Name = name; + + while (keys.MoveNext() && values.MoveNext()) + { + var childName = (string)keys.Current; + nbt.Add(SerializeChild(childName, values.Current)); + } + + return nbt; + } + + private static IDictionary GetDictionary(Type type, NbtCompound tag) + { + var dictionary = (IDictionary)Activator.CreateInstance(type); + + FillDictionary(dictionary, type, tag); + return dictionary; + } + + private static void FillDictionary(IDictionary dictionary, Type type, NbtCompound tag) + { + var dictionaryType = type.GetGenericArguments().Last(); + + foreach (var child in tag) + { + dictionary.Add(child.Name, DeserializeChild(dictionaryType, child)); + } + } + } +} diff --git a/fNbt/Tags/NbtCompound.cs b/fNbt/Tags/NbtCompound.cs index 7adaba7..ce1a16d 100644 --- a/fNbt/Tags/NbtCompound.cs +++ b/fNbt/Tags/NbtCompound.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Diagnostics; +using System.Linq; using System.Text; using fNbt.Tags; using JetBrains.Annotations; @@ -504,7 +505,17 @@ bool ICollection.IsReadOnly { #region Implementation of ICollection void ICollection.CopyTo(Array array, int index) { - CopyTo((NbtTag[])array, index); + if (array is NbtTag[] nbtTags) { + CopyTo(nbtTags, index); + + return; + } + + var values = tags.Values.ToArray(); + for (int i = 0; i < tags.Count; i++) { + array.SetValue(values[index + i], i); + } + //throw new ArgumentException("Array does not contain NbtTag's"); } diff --git a/fNbt/Tags/NbtList.cs b/fNbt/Tags/NbtList.cs index 4fd954d..621d285 100644 --- a/fNbt/Tags/NbtList.cs +++ b/fNbt/Tags/NbtList.cs @@ -552,7 +552,16 @@ bool IList.IsFixedSize { void ICollection.CopyTo(Array array, int index) { - CopyTo((NbtTag[])array, index); + if (array is NbtTag[] nbtTags) { + CopyTo(nbtTags, index); + + return; + } + + var values = tags.ToArray(); + for (int i = 0; i < tags.Count; i++) { + array.SetValue(values[index + i], i); + } } diff --git a/fNbt/fNbt.csproj b/fNbt/fNbt.csproj index 2e5d89d..acc784c 100644 --- a/fNbt/fNbt.csproj +++ b/fNbt/fNbt.csproj @@ -1,18 +1,19 @@  - netcoreapp2.1 + net6.0; netcoreapp3.1; netstandard2.1 true true - MiNET.fnbt + MiNET.fNbt 0.0.0 - gurun + NiclasOlofsson; kennyvv Niclas Olofsson MiNET fnbt version with support for MCPE 0.16+ varint and string. - 2010-2011 Erik Davidson; 2012-2015 Matvei Stefarov; 2016-2018 Niclas Olofsson + 2010-2011 Erik Davidson; 2012-2015 Matvei Stefarov; 2016-2022 Niclas Olofsson https://github.com/NiclasOlofsson/fNbt/blob/master/docs/LICENSE https://github.com/NiclasOlofsson/fNbt + https://github.com/NiclasOlofsson/fNbt MiNET fnbt nbt MCPE varint and string 1.0.0.0