本文整理汇总了C#中ripple.Model.Solution.UsePublisher方法的典型用法代码示例。如果您正苦于以下问题:C# Solution.UsePublisher方法的具体用法?C# Solution.UsePublisher怎么用?C# Solution.UsePublisher使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ripple.Model.Solution
的用法示例。
在下文中一共展示了Solution.UsePublisher方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: publishes_the_specification
public void publishes_the_specification()
{
var s1 = new NugetSpec("Test1", "Test1.nuspec");
var solution = new Solution();
var service = MockRepository.GenerateStub<IPublishingService>();
service.Stub(x => x.SpecificationsFor(solution)).Return(new[] { s1 });
solution.UsePublisher(service);
var version = SemanticVersion.Parse("1.1.2.3");
var ctx = new PackageParams(s1, version, "artifacts", false);
solution.Package(ctx);
service.AssertWasCalled(x => x.CreatePackage(ctx));
}
示例2: retrieve_the_nuget_specs
public void retrieve_the_nuget_specs()
{
var s1 = new NugetSpec("Test1", "Test1.nuspec");
var s2 = new NugetSpec("Test2", "Test2.nuspec");
var solution = new Solution();
var service = MockRepository.GenerateStub<IPublishingService>();
service.Stub(x => x.SpecificationsFor(solution)).Return(new[] { s1, s2 });
solution.UsePublisher(service);
solution.Specifications.ShouldHaveTheSameElementsAs(s1, s2);
}