Ejemplo n.º 1
0
            public void can_uninstall()
            {
                Moo.Install(PathToContent("packages", "MarkdownSharp.1.13.0.0.nupkg"));
                File.Exists(PathToTempHome(".moo", "cache", "MarkdownSharp-1.13.0.0.nupkg")).ShouldBeTrue();
                File.Exists(PathToTempHome(".moo", "specifications", "MarkdownSharp-1.13.0.0.nuspec")).ShouldBeTrue();
                Directory.Exists(PathToTempHome(".moo", "packages", "MarkdownSharp-1.13.0.0")).ShouldBeTrue();

                Moo.Uninstall("MarkdownSharp");

                File.Exists(PathToTempHome(".moo", "cache", "MarkdownSharp-1.13.0.0.nupkg")).ShouldBeTrue();                 // we keep the cached nupkg
                File.Exists(PathToTempHome(".moo", "specifications", "MarkdownSharp-1.13.0.0.nuspec")).ShouldBeFalse();
                Directory.Exists(PathToTempHome(".moo", "packages", "MarkdownSharp-1.13.0.0")).ShouldBeFalse();
            }
Ejemplo n.º 2
0
        public static object Run(string[] args)
        {
            var package = Moo.Uninstall(args[0]);

            if (package == null)
            {
                return(string.Format("Package not found: {0}", args[0]));
            }
            else
            {
                return(string.Format("Uninstalled {0}", package.IdAndVersion));
            }
        }