Exemplo n.º 1
0
        public void add_remote_link_modifies_existing()
        {
            var manifest = new LinkManifest();
            manifest.AddRemoteLink(new LinkInput
            {
                BottleFolder = "foo",
                AppFolder = System.Environment.CurrentDirectory
            });

            manifest.AddRemoteLink(new LinkInput
            {
                BottleFolder = "foo",
                BootstrapperFlag = "SomeClass",
                AppFolder = System.Environment.CurrentDirectory
            });

            manifest.AddRemoteLink(new LinkInput
            {
                AppFolder = System.Environment.CurrentDirectory,
                BottleFolder = "foo",
                BootstrapperFlag = "OtherClass",
                ConfigFileFlag = "Web.config"
            });

            var link = manifest.RemoteLinks.Single();
            link.Folder.ShouldEqual("foo");
            link.BootstrapperName.ShouldEqual("OtherClass");
            link.ConfigFile.ShouldEqual("Web.config");
        }
Exemplo n.º 2
0
        public void remove_link_can_get_remote_link_too()
        {
            var manifest = new LinkManifest();
            manifest.AddRemoteLink(new LinkInput
            {
                AppFolder = System.Environment.CurrentDirectory,
                BottleFolder = "foo"
            });

            manifest.RemoveLink("foo");

            manifest.RemoteLinks.Any().ShouldBeFalse();
        }
Exemplo n.º 3
0
        public void remove_all_linked_folders_gets_remotes_too()
        {
            var manifest = new LinkManifest();
            manifest.AddLink("foo");
            manifest.AddRemoteLink(new LinkInput
            {
                AppFolder = System.Environment.CurrentDirectory,
                BottleFolder = "foo"
            });

            manifest.RemoteLinks.Any().ShouldBeTrue();
            manifest.LinkedFolders.Any().ShouldBeTrue();

            manifest.RemoveAllLinkedFolders();

            manifest.RemoteLinks.Any().ShouldBeFalse();
            manifest.LinkedFolders.Any().ShouldBeFalse();
        }