BackEnd\BinaryTranslator_Tests.cs (91)
176TranslationHelpers.GetWriteTranslator().TranslateEnum(ref value, (int)value);
179TranslationHelpers.GetReadTranslator().TranslateEnum(ref deserializedValue, (int)deserializedValue);
188TranslationHelpers.GetWriteTranslator().TranslateException(ref value);
191TranslationHelpers.GetReadTranslator().TranslateException(ref deserializedValue);
193Assert.True(TranslationHelpers.CompareExceptions(value, deserializedValue, out string diffReason), diffReason);
210TranslationHelpers.GetWriteTranslator().TranslateException(ref value);
213TranslationHelpers.GetReadTranslator().TranslateException(ref deserializedValue);
215Assert.True(TranslationHelpers.CompareExceptions(value, deserializedValue, out string diffReason), diffReason);
239TranslationHelpers.GetWriteTranslator().TranslateException(ref value);
242TranslationHelpers.GetReadTranslator().TranslateException(ref deserializedValue);
244Assert.True(TranslationHelpers.CompareExceptions(value, deserializedValue, out string diffReason), diffReason);
278TranslationHelpers.GetWriteTranslator().TranslateException(ref remote);
281TranslationHelpers.GetReadTranslator().TranslateException(ref deserializedValue);
283Assert.True(TranslationHelpers.CompareExceptions(remote, deserializedValue, out string diffReason, true), $"Exception type {exceptionType.FullName} not properly de/serialized: {diffReason}");
299TranslationHelpers.GetWriteTranslator().TranslateException(ref value);
302TranslationHelpers.GetReadTranslator().TranslateException(ref deserializedValue);
304Assert.True(TranslationHelpers.CompareExceptions(value, deserializedValue, out string diffReason, true), diffReason);
314TranslationHelpers.GetWriteTranslator().Translate(ref value);
317TranslationHelpers.GetReadTranslator().Translate(ref deserializedValue);
330TranslationHelpers.GetWriteTranslator().Translate(ref value);
333TranslationHelpers.GetReadTranslator().Translate(ref deserializedValue);
345TranslationHelpers.GetWriteTranslator().Translate(ref value, BaseClass.FactoryForDeserialization);
348TranslationHelpers.GetReadTranslator().Translate(ref deserializedValue, BaseClass.FactoryForDeserialization);
360TranslationHelpers.GetWriteTranslator().Translate(ref value, BaseClass.FactoryForDeserialization);
363TranslationHelpers.GetReadTranslator().Translate(ref deserializedValue, BaseClass.FactoryForDeserialization);
375TranslationHelpers.GetWriteTranslator().TranslateArray(ref value);
378TranslationHelpers.GetReadTranslator().TranslateArray(ref deserializedValue);
380Assert.True(TranslationHelpers.CompareCollections(value, deserializedValue, DerivedClass.Comparer));
390TranslationHelpers.GetWriteTranslator().TranslateArray(ref value);
393TranslationHelpers.GetReadTranslator().TranslateArray(ref deserializedValue);
395Assert.True(TranslationHelpers.CompareCollections(value, deserializedValue, DerivedClass.Comparer));
405TranslationHelpers.GetWriteTranslator().TranslateArray(ref value, BaseClass.FactoryForDeserialization);
408TranslationHelpers.GetReadTranslator().TranslateArray(ref deserializedValue, BaseClass.FactoryForDeserialization);
410Assert.True(TranslationHelpers.CompareCollections(value, deserializedValue, BaseClass.Comparer));
420TranslationHelpers.GetWriteTranslator().TranslateArray(ref value, BaseClass.FactoryForDeserialization);
423TranslationHelpers.GetReadTranslator().TranslateArray(ref deserializedValue, BaseClass.FactoryForDeserialization);
425Assert.True(TranslationHelpers.CompareCollections(value, deserializedValue, BaseClass.Comparer));
438TranslationHelpers.GetWriteTranslator().TranslateDictionary(ref value, StringComparer.OrdinalIgnoreCase);
441TranslationHelpers.GetReadTranslator().TranslateDictionary(ref deserializedValue, StringComparer.OrdinalIgnoreCase);
457TranslationHelpers.GetWriteTranslator().TranslateDictionary(ref value, StringComparer.OrdinalIgnoreCase);
460TranslationHelpers.GetReadTranslator().TranslateDictionary(ref deserializedValue, StringComparer.OrdinalIgnoreCase);
476TranslationHelpers.GetWriteTranslator().TranslateDictionary(ref value, StringComparer.OrdinalIgnoreCase, BaseClass.FactoryForDeserialization);
479TranslationHelpers.GetReadTranslator().TranslateDictionary(ref deserializedValue, StringComparer.OrdinalIgnoreCase, BaseClass.FactoryForDeserialization);
496TranslationHelpers.GetWriteTranslator().TranslateDictionary(ref value, StringComparer.OrdinalIgnoreCase, BaseClass.FactoryForDeserialization);
499TranslationHelpers.GetReadTranslator().TranslateDictionary(ref deserializedValue, StringComparer.OrdinalIgnoreCase, BaseClass.FactoryForDeserialization);
515TranslationHelpers.GetWriteTranslator().TranslateDictionary<Dictionary<string, BaseClass>, BaseClass>(ref value, BaseClass.FactoryForDeserialization);
518TranslationHelpers.GetReadTranslator().TranslateDictionary<Dictionary<string, BaseClass>, BaseClass>(ref deserializedValue, BaseClass.FactoryForDeserialization);
535TranslationHelpers.GetWriteTranslator().TranslateDictionary<Dictionary<string, BaseClass>, BaseClass>(ref value, BaseClass.FactoryForDeserialization);
538TranslationHelpers.GetReadTranslator().TranslateDictionary<Dictionary<string, BaseClass>, BaseClass>(ref deserializedValue, BaseClass.FactoryForDeserialization);
552TranslationHelpers.GetWriteTranslator().Translate(ref value);
555TranslationHelpers.GetReadTranslator().Translate(ref deserializedValue);
564TranslationHelpers.GetWriteTranslator().Translate(ref value);
567TranslationHelpers.GetReadTranslator().Translate(ref deserializedValue);
579TranslationHelpers.GetWriteTranslator().Translate(ref value);
582TranslationHelpers.GetReadTranslator().Translate(ref deserializedValue);
591TranslationHelpers.GetWriteTranslator().Translate(ref value);
594TranslationHelpers.GetReadTranslator().Translate(ref deserializedValue);
608TranslationHelpers.GetWriteTranslator().TranslateHashSet(ref values, BaseClass.FactoryForDeserialization, capacity => new());
611TranslationHelpers.GetReadTranslator().TranslateHashSet(ref deserializedValues, BaseClass.FactoryForDeserialization, capacity => new());
620TranslationHelpers.GetWriteTranslator().TranslateHashSet(ref value, BaseClass.FactoryForDeserialization, capacity => new());
623TranslationHelpers.GetReadTranslator().TranslateHashSet(ref deserializedValue, BaseClass.FactoryForDeserialization, capacity => new());
632TranslationHelpers.GetWriteTranslator().Translate(ref value);
635TranslationHelpers.GetReadTranslator().Translate(ref deserializedValue);
659TranslationHelpers.GetWriteTranslator().Translate(ref value);
662TranslationHelpers.GetReadTranslator().Translate(ref deserializedValue);
672TranslationHelpers.GetWriteTranslator().Translate(ref value);
675TranslationHelpers.GetReadTranslator().Translate(ref deserializedValue);
705TranslationHelpers.GetWriteTranslator().Translate(ref value);
708TranslationHelpers.GetReadTranslator().Translate(ref deserializedValue);
719TranslationHelpers.GetWriteTranslator().Translate(ref value);
722TranslationHelpers.GetReadTranslator().Translate(ref deserializedValue);
733TranslationHelpers.GetWriteTranslator().Translate(ref value);
736TranslationHelpers.GetReadTranslator().Translate(ref deserializedValue);
747TranslationHelpers.GetWriteTranslator().Translate(ref value);
750TranslationHelpers.GetReadTranslator().Translate(ref deserializedValue);
761TranslationHelpers.GetWriteTranslator().Translate(ref value);
764TranslationHelpers.GetReadTranslator().Translate(ref deserializedValue);
775TranslationHelpers.GetWriteTranslator().Translate(ref value);
778TranslationHelpers.GetReadTranslator().Translate(ref deserializedValue);
789TranslationHelpers.GetWriteTranslator().Translate(ref value);
792TranslationHelpers.GetReadTranslator().Translate(ref deserializedValue);
803TranslationHelpers.GetWriteTranslator().Translate(ref value);
806TranslationHelpers.GetReadTranslator().Translate(ref deserializedValue);
817TranslationHelpers.GetWriteTranslator().Translate(ref value);
820TranslationHelpers.GetReadTranslator().Translate(ref deserializedValue);
831TranslationHelpers.GetWriteTranslator().Translate(ref value);
834TranslationHelpers.GetReadTranslator().Translate(ref deserializedValue);
836Assert.True(TranslationHelpers.CompareCollections(value, deserializedValue, comparer));
845TranslationHelpers.GetWriteTranslator().Translate(ref value);
848TranslationHelpers.GetReadTranslator().Translate(ref deserializedValue);
850Assert.True(TranslationHelpers.CompareCollections(value, deserializedValue, comparer));
BackEnd\BuildResult_Tests.cs (9)
327((ITranslatable)result).Translate(TranslationHelpers.GetWriteTranslator());
328INodePacket packet = BuildResult.FactoryForDeserialization(TranslationHelpers.GetReadTranslator());
333Assert.True(TranslationHelpers.CompareCollections(result.DefaultTargets, deserializedResult.DefaultTargets, StringComparer.Ordinal));
334Assert.True(TranslationHelpers.CompareExceptions(result.Exception, deserializedResult.Exception, out string diffReason), diffReason);
337Assert.True(TranslationHelpers.CompareCollections(result.InitialTargets, deserializedResult.InitialTargets, StringComparer.Ordinal));
340Assert.True(TranslationHelpers.CompareExceptions(result["alpha"].Exception, deserializedResult["alpha"].Exception, out diffReason), diffReason);
341Assert.True(TranslationHelpers.CompareCollections(result["alpha"].Items, deserializedResult["alpha"].Items, TaskItemComparer.Instance));
343Assert.True(TranslationHelpers.CompareExceptions(result["omega"].Exception, deserializedResult["omega"].Exception, out diffReason), diffReason);
344Assert.True(TranslationHelpers.CompareCollections(result["omega"].Items, deserializedResult["omega"].Items, TaskItemComparer.Instance));
BackEnd\TargetResult_Tests.cs (8)
100((ITranslatable)result).Translate(TranslationHelpers.GetWriteTranslator());
101TargetResult deserializedResult = TargetResult.FactoryForDeserialization(TranslationHelpers.GetReadTranslator());
104Assert.True(TranslationHelpers.CompareCollections(result.Items, deserializedResult.Items, TaskItemComparer.Instance));
105Assert.True(TranslationHelpers.CompareExceptions(result.Exception, deserializedResult.Exception, out string diffReason), diffReason);
120((ITranslatable)result).Translate(TranslationHelpers.GetWriteTranslator());
121TargetResult deserializedResult = TargetResult.FactoryForDeserialization(TranslationHelpers.GetReadTranslator());
124Assert.True(TranslationHelpers.CompareCollections(result.Items, deserializedResult.Items, TaskItemComparer.Instance));
125Assert.True(TranslationHelpers.CompareExceptions(result.Exception, deserializedResult.Exception, out string diffReason), diffReason);
BuildEventArgsSerialization_Tests.cs (17)
77e => serializeAllEnvironmentVariables ? TranslationHelpers.ToString(e.BuildEnvironment) : null,
144e => TranslationHelpers.GetPropertiesString(e.GlobalProperties),
145e => TranslationHelpers.GetPropertiesString(e.EntryProjectsFullPath),
146e => TranslationHelpers.GetPropertiesString(e.TargetNames),
169e => TranslationHelpers.GetPropertiesString(e.GlobalProperties),
170e => TranslationHelpers.GetMultiItemsString(e.Items),
175e => TranslationHelpers.GetPropertiesString(e.Properties),
360e => TranslationHelpers.ToString(e.ExtendedMetadata),
433e => TranslationHelpers.ToString(e.ExtendedMetadata),
510e => TranslationHelpers.ToString(e.ExtendedMetadata),
611TranslationHelpers.ToString(desArgs.ExtendedMetadata).ShouldBe(TranslationHelpers.ToString(args.ExtendedMetadata));
693e => TranslationHelpers.ToString(e.ExtendedMetadata),
739e => TranslationHelpers.GetItemsString(e.Items));
777e => TranslationHelpers.GetPropertiesString(e.GlobalProperties),
778e => TranslationHelpers.GetPropertiesString(e.Properties),
779e => TranslationHelpers.GetMultiItemsString(e.Items));