本文整理汇总了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);
}
示例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>();
}
示例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);
}
示例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"));
}
示例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");
});
}
示例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"));
});
}
示例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);
}
示例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));
}
示例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));
}
示例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));
}