Alquimiaware.NuGetUnity.Tests.FileSystemPackageProviderTests.ValidSource.AssertHasTarget C# (CSharp) Method

AssertHasTarget() private static method

private static AssertHasTarget ( Package fooPkg, string expectedTargetName ) : void
fooPkg Package
expectedTargetName string
return void
            private static void AssertHasTarget(
                Package fooPkg,
                string expectedTargetName)
            {
                string expectedTargetLocation = Path.Combine(
                    SourcePath(),
                    fooPkg.Name + "/lib/" + expectedTargetName);

                Assert.IsNotNull(fooPkg.TargetLibs);
                var target = fooPkg.TargetLibs.FirstOrDefault(
                        l => l.Name == expectedTargetName);

                Assert.IsTrue(
                    target != null
                    && AreEquivalentPaths(
                        expectedTargetLocation,
                        target.FolderLocation),
                    string.Format(
                        "Expected target : {0}\n" +
                        "Expected location: {1}\n" +
                        "Actual target: {2}\n" +
                        "Actual location: {3}",
                        Path.GetFullPath(expectedTargetName),
                        Path.GetFullPath(expectedTargetLocation),
                        target != null ? target.Name : "<Target Not Found>",
                        target != null ? target.FolderLocation : "<Target Not Found>"));
            }