public void BundleManifestsAreEqualEvenIfAssetsAreInDifferentOrders() { var manifest1 = new TestableBundleManifest { Path = "~/path", Assets = { new AssetManifest { Path = "~/A" }, new AssetManifest { Path = "~/B" } } }; var manifest2 = new TestableBundleManifest { Path = "~/path", Assets = { new AssetManifest { Path = "~/B" }, new AssetManifest { Path = "~/A" } } }; manifest1.Equals(manifest2).ShouldBeTrue(); }
public BundleManifest_CreateBundle_Tests() { settings = new CassetteSettings(""); manifest = new TestableBundleManifest { Path = "~", Hash = new byte[0] }; }
public void BundleManifestsWithSamePathsButDiffentCasingAreEqual() { var manifest1 = new TestableBundleManifest { Path = "~/PATH" }; var manifest2 = new TestableBundleManifest { Path = "~/path" }; manifest1.Equals(manifest2).ShouldBeTrue(); }
public void BundleManifestsWithSamePathAndNoAssetsAreEqual() { var manifest1 = new TestableBundleManifest { Path = "~/path" }; var manifest2 = new TestableBundleManifest { Path = "~/path" }; manifest1.Equals(manifest2).ShouldBeTrue(); }
public void BundleManifestsWithSameAssetsAreEqual() { var manifest1 = new TestableBundleManifest { Path = "~/path", Assets = { new AssetManifest { Path = "~/asset-path" } } }; var manifest2 = new TestableBundleManifest { Path = "~/path", Assets = { new AssetManifest { Path = "~/asset-path" } } }; manifest1.Equals(manifest2).ShouldBeTrue(); }
public void BundleManifestsWithDifferentAssetsAreNotEqual() { var manifest1 = new TestableBundleManifest { Path = "~/path", Assets = { new AssetManifest { Path = "~/asset-path" } } }; var manifest2 = new TestableBundleManifest { Path = "~/path", Assets = { new AssetManifest { Path = "~/different-asset-path" } } }; manifest1.Equals(manifest2).ShouldBeFalse(); }
public BundleManifestWriter_Tests() { manifest = new TestableBundleManifest { Path = "~", Hash = new byte[] { 1, 2, 3 }, ContentType = "content-type", PageLocation = "page-location", Assets = { new AssetManifest { Path = "~/asset", References = { new AssetReferenceManifest { Path = "~/raw-file/reference", Type = AssetReferenceType.RawFilename } } } }, References = { "~/bundle-reference" }, HtmlAttributes = { { "attribute", "value" } }, Content = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 } }; WriteToElement(); }
public BundleManifest_IsUpToDateWithFileSystem_Tests() { tempDirectory = new TempDirectory(); manifest = new TestableBundleManifest(); directory = new FileSystemDirectory(tempDirectory); }