Test.BuildXL.TestUtilities.Xunit.XAssert.RenderContainer(System.Collections.Generic.IEnumerable)

Here are the examples of the csharp api Test.BuildXL.TestUtilities.Xunit.XAssert.RenderContainer(System.Collections.Generic.IEnumerable) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

3 Examples 7

19 Source : XAssert.cs
with MIT License
from microsoft

private static void replacedertNoFailures<T>(IEnumerable<T> container, (T elem, Exception exception)[] failures)
        {
            if (failures.Length > 0)
            {
                var nl = Environment.NewLine;
                var errorMessage = $"Xreplacedert.All() Failure: {failures.Length} out of {container.Count()} items did not preplaced;{nl}" +
                    $"  Failed items: {RenderContainer(failures.Select(t => t.elem))}{nl}" +
                    $"  All items: {RenderContainer(container)}";
                var exceptions = failures.Where(t => t.exception != null).ToArray();
                if (exceptions.Any())
                {
                    var exceptionsStr = string.Join(
                        $"{nl}====================================================={nl}",
                        exceptions.Select(t => $"{nl}  [{t.elem}]  {t.exception.ToString()}"));
                    errorMessage += $"{nl}  Exceptions:{exceptionsStr}";
                }
                Fail(errorMessage);
            }
        }

19 Source : XAssert.cs
with MIT License
from microsoft

public static void ContainsNot<T>(IEnumerable<T> container, params T[] elems)
        {
            foreach (var elem in elems)
            {
                if (container.Contains(elem))
                {
                    Fail(I($"Element '{elem}' found in container: {RenderContainer(container)}"));
                }
            }
        }

19 Source : XAssert.cs
with MIT License
from microsoft

public static void Contains<T>(IEnumerable<T> container, params T[] elems)
        {
            foreach (var elem in elems)
            {
                if (!container.Contains(elem))
                {
                    Fail(I($"Element '{elem}' not found in container: {RenderContainer(container)}"));
                }
            }
        }