public void SetUp() { theSolution = new Solution(); p1 = theSolution.AddProject("MyProject"); p1.AddDependency("Bottles"); p1.AddDependency("FubuCore"); p1.AddDependency("FubuLocalization"); p2 = theSolution.AddProject("MyOtherProject"); p2.AddDependency("FubuMVC.Core"); theSolution.AddDependency(new Dependency("Bottles", "1.0.0.0", UpdateMode.Fixed)); theSolution.AddDependency(new Dependency("FubuCore", "1.1.0.0", UpdateMode.Float)); theSolution.AddDependency(new Dependency("FubuLocalization", "1.2.0.0", UpdateMode.Fixed)); theSolution.AddDependency(new Dependency("FubuMVC.Core", "1.4.0.0", UpdateMode.Fixed)); theNugetSpec = new NugetSpec("MyProject", "myproject.nuspec"); theGroup = new NuspecTemplate(theNugetSpec, new[] { new ProjectNuspec(p1, new NugetSpec("MyProject", "MyProject.nuspec")), new ProjectNuspec(p2, new NugetSpec("MyOtherProject", "MyOtherProject.nuspec")) }); }
public void can_read_and_write_the_packages_config() { var theFileSystem = new FileSystem(); theFileSystem.WriteStringToFile(NuGetDependencyStrategy.PackagesConfig, "<?xml version=\"1.0\" encoding=\"utf-8\"?><packages></packages>"); var theSolution = new Solution(); theSolution.AddDependency(new Dependency("Bottles", "1.0.1.1")); theSolution.AddDependency(new Dependency("FubuCore", "1.2.0.1")); var theProject = new Project("Test.csproj"); theProject.AddDependency("Bottles"); theProject.AddDependency("FubuCore"); theSolution.AddProject(theProject); var theStrategy = new NuGetDependencyStrategy(); theStrategy.Write(theProject); theStrategy .Read(theProject) .ShouldHaveTheSameElementsAs( new Dependency("Bottles", "1.0.1.1"), new Dependency("FubuCore", "1.2.0.1") ); theFileSystem.DeleteFile(NuGetDependencyStrategy.PackagesConfig); }
public void SetUp() { theSolution = new Solution(); theSolution.ClearFeeds(); theSolution.AddFeed(Feed.Fubu); theSolution.AddFeed(Feed.NuGetV2); theSolution.AddDependency(bottles = new Dependency("Bottles")); theSolution.AddDependency(fubucore = new Dependency("FubuCore", "1.0.1.201")); theSolution.AddDependency(rhinomocks = new Dependency("RhinoMocks", "3.6.1", UpdateMode.Fixed)); theSolution.AddDependency(structuremap = new Dependency("StructureMap", "2.6.3", UpdateMode.Fixed)); FeedScenario.Create(scenario => { scenario.For(Feed.Fubu) .Add("Bottles", "1.0.2.2") .Add("FubuCore", "1.0.2.232") .Add("StructureMap", "2.6.4.71"); scenario.For(Feed.NuGetV2) .Add("RhinoMocks", "3.6.1") .Add("StructureMap", "2.6.3"); scenario.For(theSolution.Cache.ToFeed()); scenario.Online(); }); }
public void SetUp() { theSolution = new Solution(); theSolution.AddDependency(new Dependency("FubuCore")); theSolution.AddDependency(new Dependency("Bottles")); theSolution.AddDependency(new Dependency("FubuLocalization")); theInput = new UpdateInput(); }
public void SetUp() { theSolution = new Solution(); theSolution.AddDependency(new Dependency("Bottles", "1.0.0.0", UpdateMode.Fixed)); theSolution.AddDependency(new Dependency("FubuCore", "1.0.0.0", UpdateMode.Fixed)); theSolution.Update("Bottles", "1.1.0.0"); theSolution.Update("FubuCore", "1.2.0.1"); }
public void persists_and_retrieves_the_solution() { var solution = new Solution { Name = "Test", BuildCommand = "rake", FastBuildCommand = "rake compile", Feeds = new[] { Feed.NuGetV2, Feed.NuGetV1 }, Nugets = new[] { new Dependency("FubuCore", "1.0.1.0") } }; var group = new DependencyGroup(); group.Dependencies.Add(new GroupedDependency("FubuCore")); solution.Groups.Add(group); var constrainedDependency = new Dependency("Bottles", "1.0.0.0") { VersionConstraint = VersionConstraint.DefaultFloat }; solution.AddDependency(constrainedDependency); solution.Nuspecs.Add(new NuspecMap { File = "Temp", Project = "Test"}); CheckXmlPersistence.For(solution); }
public void SetUp() { theSolution = new Solution(); theSolution.ClearFeeds(); theSolution.AddFeed(Feed.Fubu); theSolution.AddFeed(Feed.NuGetV2); theSolution.AddDependency(fubucore = new Dependency("FubuCore", "1.0.1.201")); var theProject = new Project("Test.csproj"); theSolution.AddProject(theProject); theProject.AddDependency(bottles = new Dependency("Bottles")); theProject.AddDependency(rhinomocks = new Dependency("RhinoMocks", "3.6.1", UpdateMode.Fixed)); theProject.AddDependency(structuremap = new Dependency("StructureMap", "2.6.3", UpdateMode.Fixed)); theFubuFeed = MockRepository.GenerateStub<IFloatingFeed>(); theFubuFeed.Stub(x => x.GetLatest()).Return(new IRemoteNuget[] { new StubNuget("Bottles", "1.0.2.2"), new StubNuget("FubuCore", "1.0.2.232"), new StubNuget("StructureMap", "2.6.4.71"), }); theNugetFeed = MockRepository.GenerateStub<INugetFeed>(); theNugetFeed.Stub(x => x.Find(rhinomocks)).Return(new StubNuget("RhinoMocks", "3.6.1")); theNugetFeed.Stub(x => x.Find(structuremap)).Return(new StubNuget("StructureMap", "2.6.3")); theFeedProvider = MockRepository.GenerateStub<IFeedProvider>(); theFeedProvider.Stub(x => x.For(Feed.Fubu)).Return(theFubuFeed); theFeedProvider.Stub(x => x.For(Feed.NuGetV2)).Return(theNugetFeed); FeedRegistry.Stub(theFeedProvider); }
public void falls_back_to_default_constraint_for_float() { var dep = new Dependency("FubuCore", UpdateMode.Float); var solution = new Solution(); solution.AddDependency(dep); solution.ConstraintFor(dep).ShouldEqual(solution.NuspecSettings.Float); }
public void find_the_async_package() { var asyncTargetPack = new Dependency("Microsoft.CompilerServices.AsyncTargetingPack"); var solution = new Solution(); solution.AddDependency(asyncTargetPack); var task = NugetSearch.Find(solution, asyncTargetPack); task.Wait(); task.Result.Nuget.Version.ShouldEqual(new SemanticVersion("1.0.1")); }
public void ExtractSolutionLevelConfiguration(SolutionConfig config, Solution solution) { var specificDependencies = new List<Dependency>(); solution.Projects.Each(project => specificDependencies.AddRange(project.Dependencies.Where(x => !x.IsFloat()))); specificDependencies.Each(dependency => { solution.AddDependency(new Dependency(dependency.Name, dependency.Version, UpdateMode.Fixed)); dependency.Float(); }); }
public void combines_the_dependencies() { var solution = new Solution(); solution.AddDependency(new Dependency("Bottles", "1.0.1.1")); var project = new Project("MyProject.csproj"); project.AddDependency(new Dependency("FubuCore", "1.2.3.4")); solution.AddProject(project); solution.Dependencies.ShouldHaveTheSameElementsAs(new Dependency("Bottles", "1.0.1.1"), new Dependency("FubuCore", "1.2.3.4")); }
public void SetUp() { theStorage = new StubNugetStorage(); theStorage.Add("FubuCore", "1.0.0.0"); theStorage.Add("Bottles", "1.0.0.0"); theStorage.Add("StructureMap", "2.6.3"); theSolution = Solution.Empty(); theSolution.AddDependency(new Dependency("FubuCore", "1.0.0.0")); theSolution.AddDependency(new Dependency("Bottles", "1.0.0.0")); theSolution.AddDependency(new Dependency("FubuLocalization", "1.0.0.0")); theSolution.AddDependency(new Dependency("StructureMap", "2.6.3", UpdateMode.Fixed)); theSolution.AddFeed(Feed.Fubu); theSolution.UseStorage(theStorage); FeedScenario.Create(scenario => { scenario .For(Feed.Fubu) .Add("StructureMap", "2.6.4.54"); }); }
public void SetUp() { theFeed = new Feed("testing"); theStorage = new StubNugetStorage(); theSolution = new Solution(); theSolution.UseStorage(theStorage); theSolution.AddFeed(theFeed); theSolution.AddDependency(new Dependency("Bottles", "1.0.0.0")); theSolution.AddDependency(new Dependency("FubuCore")); theSolution.AddDependency(new Dependency("StructureMap", "2.6.3", UpdateMode.Fixed)); theFeedService = theSolution.FeedService.As<FeedService>(); FeedScenario.Create(scenario => { scenario.For(theFeed) .Add(new Dependency("Bottles", "1.0.0.0")) .Add(new Dependency("Bottles", "1.0.1.0")) .Add(new Dependency("FubuCore", "1.2.0.0")) .Add(new Dependency("StructureMap", "2.6.4.54")); }); }
public void SetUp() { theSolution = new Solution(); p1 = theSolution.AddProject("MyProject"); p1.AddDependency("Bottles"); p1.AddDependency("FubuCore"); p1.AddDependency("FubuLocalization"); p2 = theSolution.AddProject("MyOtherProject"); p2.AddDependency("FubuMVC.Core"); theSolution.AddDependency(new Dependency("Bottles", "1.0.0.0", UpdateMode.Fixed)); theSolution.AddDependency(new Dependency("FubuCore", "1.1.0.0", UpdateMode.Float)); theSolution.AddDependency(new Dependency("FubuLocalization", "1.2.0.0", UpdateMode.Fixed)); theSolution.AddDependency(new Dependency("FubuMVC.Core", "1.4.0.0", UpdateMode.Fixed)); theNugetSpec = new NugetSpec("MyProject", "myproject.nuspec"); // explicit dependencies are not overridden theNugetSpec.Dependencies.Add(new NuspecDependency("Bottles", "1.0.0.0")); theGroup = new SpecGroup(theNugetSpec, new[] { p1, p2 }); }
public void persists_and_retrieves_the_solution() { var solution = new Solution { Name = "Test", Feeds = new[] { Feed.NuGetV2, Feed.NuGetV1 }, Nugets = new[] { new Dependency("FubuCore", "1.0.1.0") } }; var group = new DependencyGroup { Name = "Test"}; group.Add(new GroupedDependency("FubuCore")); solution.AddGroup(group); solution.AddDependency(new Dependency("Bottles", "1.0.0.0") { VersionConstraint = VersionConstraint.DefaultFloat }); solution.AddNuspec(new NuspecMap { PackageId = "Temp", PublishedBy = "Test" }); solution.Ignore("Rhino.ServiceBus.dll", "Esent.Interop.dll"); var registry = new RippleBlockRegistry(); var solutionSettings = registry.SettingsFor(typeof (Solution)); CheckObjectBlockPersistence .ForSolution(solution) .VerifyProperties(property => { if (!property.CanWrite) return false; if (solutionSettings.ShouldIgnore(solution, new SingleProperty(property))) return false; return true; }); }
public void SetUp() { theStorage = new StubNugetStorage(); theStorage.Add("FubuCore", "1.0.0.0"); theStorage.Add("Bottles", "1.0.0.0"); theStorage.Add("FubuLocalization", "1.0.0.0"); theSolution = new Solution(); theSolution.AddDependency(new Dependency("FubuCore", "1.0.0.0")); theSolution.AddDependency(new Dependency("Bottles", "1.0.0.0")); theSolution.AddDependency(new Dependency("FubuLocalization", "1.0.0.0")); theSolution.AddFeed(new Feed("local")); theSolution.UseStorage(theStorage); FeedScenario.Create(scenario => { scenario.For(new Feed("local")) .Add("FubuCore", "1.0.0.1") .Add("Bottles", "1.0.0.0"); }); }
public void find_the_dependency_configuration() { var dependency = new Dependency("Bottles", "1.0.0.0"); var solution = new Solution(); solution.AddDependency(dependency); solution.FindDependency("Bottles").ShouldEqual(dependency); }
public void uses_explicit_dependency_constraint() { var explicitDep = new Dependency("FubuCore") { Constraint = "Current,NextMinor"}; var solution = new Solution(); solution.AddDependency(explicitDep); solution.ConstraintFor(explicitDep).ToString().ShouldEqual("Current,NextMinor"); }