Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/ShapeTagEmissionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ public void ShapeTagIsCommentedOutByDefault()
string generatedView = GenerateView("[ZeroSerializer.ZeroSerializer] public class Record { public int Value { get; set; } }");

// Do not remove leading spaces (no indentation checks are fragile).
Assert.DoesNotContain(" /// <remarks>", generatedView);
Assert.DoesNotContain(" public const string ShapeTag", generatedView);
Assert.DoesNotContain(" /// ShapeTag: `v1/", generatedView);
Assert.DoesNotContain(" public const string ShapeTag = \"v1/", generatedView);
Assert.Contains(" // Note: Emitting ShapeTag requires `EmitShapeTag = true` on ZeroSerializerAttribute.", generatedView);
Assert.Contains(" ///// <summary>", generatedView);
Assert.Contains(" ///// A structural signature that describes the layout of the serialized type and any nested structures.", generatedView);
Assert.Contains(" ///// </summary>", generatedView);
Assert.Contains(" //public const string ShapeTag = \"v1/{int}\";", generatedView);

Assert.Contains(" /// <summary>", generatedView);
Assert.Contains(" /// A hash of the structural signature that describes the layout of the serialized type and any nested structures.", generatedView);
Assert.Contains(" /// </summary>", generatedView);
Expand All @@ -39,7 +40,6 @@ public void ShapeTagAndRemarksAreEmittedWhenRequested()
string generatedView = GenerateView("[ZeroSerializer.ZeroSerializer(EmitShapeTag = true)] public class Record { public int Value { get; set; } }");

// Do not remove leading spaces (no indentation checks are fragile).
Assert.Contains(" /// <remarks>", generatedView);
Assert.Contains(" /// ShapeTag: `v1/{int}`", generatedView);
Assert.Contains(" /// <summary>", generatedView);
Assert.Contains(" /// A structural signature that describes the layout of the serialized type and any nested structures.", generatedView);
Expand Down
Loading