當前位置: 首頁>>代碼示例>>C#>>正文


C# Solution.UseStorage方法代碼示例

本文整理匯總了C#中ripple.Model.Solution.UseStorage方法的典型用法代碼示例。如果您正苦於以下問題:C# Solution.UseStorage方法的具體用法?C# Solution.UseStorage怎麽用?C# Solution.UseStorage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ripple.Model.Solution的用法示例。


在下文中一共展示了Solution.UseStorage方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: local_dependencies

        public void local_dependencies()
        {
            var solution = new Solution();
            var storage = MockRepository.GenerateStub<INugetStorage>();

            var dependencies = new LocalDependencies(new[] { new NugetFile("Bottles.1.0.1.252.nupkg", SolutionMode.Ripple) });
            storage.Stub(x => x.Dependencies(solution)).Return(dependencies);

            solution.UseStorage(storage);

            solution.LocalDependencies().ShouldEqual(dependencies);
        }
開發者ID:modulexcite,項目名稱:ripple,代碼行數:12,代碼來源:SolutionTester.cs

示例2: convert_solution

        public void convert_solution()
        {
            var storage = MockRepository.GenerateStub<INugetStorage>();

            var solution = new Solution();
            solution.UseStorage(storage);

            solution.ConvertTo(SolutionMode.Ripple);

            storage.AssertWasCalled(x => x.Reset(solution));

            solution.Storage.ShouldBeOfType<NugetStorage>().Strategy.ShouldBeOfType<RippleDependencyStrategy>();
        }
開發者ID:bobpace,項目名稱:ripple,代碼行數:13,代碼來源:SolutionTester.cs

示例3: missing_files

        public void missing_files()
        {
            var solution = new Solution();
            var storage = MockRepository.GenerateStub<INugetStorage>();

            var q1 = new Dependency("Bottles", "1.0.1.1");
            var q2 = new Dependency("FubuCore", "1.0.1.252");

            storage.Stub(x => x.MissingFiles(solution)).Return(new[] { q1, q2 });

            solution.UseStorage(storage);

            solution.MissingNugets().ShouldHaveTheSameElementsAs(q1, q2);
        }
開發者ID:modulexcite,項目名稱:ripple,代碼行數:14,代碼來源:SolutionTester.cs

示例4: get_nuget_directory

        public void get_nuget_directory()
        {
            var solution = new Solution
            {
                SourceFolder = "source",
                Directory = ".".ToFullPath()
            };

            var storage = new StubNugetStorage();
            storage.Add("FubuCore", "0.9.1.37");
            solution.UseStorage(storage);

            var project = new Project("something.csproj");
            var dependency = new Dependency("FubuCore", "0.9.1.37");
            project.AddDependency(dependency);
            solution.AddProject(project);

            var spec = new NugetSpec("FubuCore", "somefile.nuspec");

            solution.NugetFolderFor(spec)
                .ShouldEqual(".".ToFullPath().AppendPath(solution.PackagesDirectory(), "FubuCore"));
        }
開發者ID:bobpace,項目名稱:ripple,代碼行數:22,代碼來源:SolutionTester.cs

示例5: SetUp

        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");
            });
        }
開發者ID:bobpace,項目名稱:ripple,代碼行數:22,代碼來源:IntegratedSolutionUpdatesTester.cs

示例6: SetUp

        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"));
            });
        }
開發者ID:ventaur,項目名稱:ripple,代碼行數:23,代碼來源:finding_the_latest_dependency.cs

示例7: SetUp

        public void SetUp()
        {
            thePlanBuilder = MockRepository.GenerateStub<INugetPlanBuilder>();

            var r1 = new NugetPlanRequest { Dependency = new Dependency("d1")};
            var r2 = new NugetPlanRequest { Dependency = new Dependency("d2") };
            var r3 = new NugetPlanRequest { Dependency = new Dependency("d3") };

            s1 = MockRepository.GenerateStub<INugetStep>();
            s2 = MockRepository.GenerateStub<INugetStep>();
            s3 = MockRepository.GenerateStub<INugetStep>();

            thePlanBuilder.Stub(x => x.PlanFor(r1)).Return(new NugetPlan(s1));
            thePlanBuilder.Stub(x => x.PlanFor(r2)).Return(new NugetPlan(s2));
            thePlanBuilder.Stub(x => x.PlanFor(r3)).Return(new NugetPlan(s3));
            
            theSolution = new Solution();
            theSolution.UseBuilder(thePlanBuilder);
            theSolution.UseStorage(new StubNugetStorage());

            var input = new StubNugetOperationContext(r1, r2, r3);
            new NugetOperation { Solution = theSolution}.Execute(input, null);
        }
開發者ID:modulexcite,項目名稱:ripple,代碼行數:23,代碼來源:NugetOperationTester.cs

示例8: saving_the_solution_with_changed_projects

        public void saving_the_solution_with_changed_projects()
        {
            var storage = MockRepository.GenerateStub<INugetStorage>();

            var solution = new Solution();
            var project = new Project("Test.csproj");

            solution.AddProject(project);
            solution.UseStorage(storage);

            project.AddDependency("FubuCore");

            solution.Save(true);

            storage.AssertWasCalled(x => x.Write(solution));
            storage.AssertWasCalled(x => x.Write(project));
        }
開發者ID:modulexcite,項目名稱:ripple,代碼行數:17,代碼來源:SolutionTester.cs

示例9: saving_the_solution_after_requesting_a_save

        public void saving_the_solution_after_requesting_a_save()
        {
            var storage = MockRepository.GenerateStub<INugetStorage>();

            var solution = new Solution();
            var project = new Project("Test.csproj");

            solution.AddProject(project);
            solution.UseStorage(storage);

            solution.RequestSave();
            solution.Save();

            storage.AssertWasCalled(x => x.Write(solution));
            storage.AssertWasNotCalled(x => x.Write(project));
        }
開發者ID:modulexcite,項目名稱:ripple,代碼行數:16,代碼來源:SolutionTester.cs

示例10: saving_the_solution_with_no_changes_in_projects

        public void saving_the_solution_with_no_changes_in_projects()
        {
            var storage = MockRepository.GenerateStub<INugetStorage>();

            var solution = new Solution();
            var project = new Project("Test.csproj");

            solution.AddProject(project);
            solution.UseStorage(storage);

            solution.Save();

            storage.AssertWasNotCalled(x => x.Write(solution));
            storage.AssertWasNotCalled(x => x.Write(project));
        }
開發者ID:modulexcite,項目名稱:ripple,代碼行數:15,代碼來源:SolutionTester.cs


注:本文中的ripple.Model.Solution.UseStorage方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。