public override void TestNormal() { var requirements = RequirementsTest.CreateTestRequirements(); var selections = SelectionsTest.CreateTestSelections(); var testFeed1 = FeedTest.CreateTestFeed(); testFeed1.Uri = FeedTest.Sub1Uri; testFeed1.Name = "Sub 1"; var testImplementation1 = testFeed1[selections.Implementations[0].ID]; FeedCacheMock.Setup(x => x.GetFeed(FeedTest.Sub1Uri)).Returns(testFeed1); var testImplementation2 = new Implementation { ID = "id2", ManifestDigest = new ManifestDigest(sha256: "abc"), Version = new ImplementationVersion("1.0") }; var testFeed2 = new Feed { Uri = FeedTest.Sub2Uri, Name = "Sub 2", Elements = { testImplementation2 } }; FeedCacheMock.Setup(x => x.GetFeed(FeedTest.Sub2Uri)).Returns(testFeed2); SolverMock.Setup(x => x.Solve(requirements)).Returns(selections); // Download uncached implementations StoreMock.Setup(x => x.Contains(It.IsAny <ManifestDigest>())).Returns(false); FetcherMock.Setup(x => x.Fetch(new[] { testImplementation1, testImplementation2 })); RunAndAssert(Resources.AllComponentsDownloaded, 0, selections, "http://0install.de/feeds/test/test1.xml", "--command=command", "--os=Windows", "--cpu=i586", "--not-before=1.0", "--before=2.0", "--version-for=http://0install.de/feeds/test/test2.xml", "2.0..!3.0"); }
public virtual void TestNormal() { var requirements = RequirementsTest.CreateTestRequirements(); var selections = SelectionsTest.CreateTestSelections(); SolverMock.Setup(x => x.Solve(requirements)).Returns(selections); RunAndAssert(selections.ToXmlString(), 0, selections, "--xml", "http://0install.de/feeds/test/test1.xml", "--command=command", "--os=Windows", "--cpu=i586", "--not-before=1.0", "--before=2.0", "--version-for=http://0install.de/feeds/test/test2.xml", "2.0..!3.0"); }