public void Resolve_PackageVersionUndefined_QueriesMetadata() { var mavenClient = new MavenClient(fileSystem, localRepository, remoteRepository); mavenClient.Resolve(new MavenPackage("group", "artifact", version: null)); A.CallTo(() => remoteRepository.OpenRead(A <string> .That.EndsWith(".xml"))).MustHaveHappenedOnceExactly(); }
public void Resolve_PackageDoesNotExist_ReadsPackageFromRemoteRepository() { var mavenClient = new MavenClient(fileSystem, localRepository, remoteRepository); mavenClient.Resolve(new MavenPackage("group", "artifact", "1.0.0")); A.CallTo(() => remoteRepository.OpenRead(A <string> .That.EndsWith(".jar"))).MustHaveHappenedOnceExactly(); }
public void Resolve_PackageExists_DoesNotReadFromRemoteRepository() { var localPackage = new FilePath("group/artifact/1.0.0/artifact-1.0.0.jar"); fileSystem.CreateFile(localRepository.CombineWithFilePath(localPackage)); var mavenClient = new MavenClient(fileSystem, localRepository, remoteRepository); mavenClient.Resolve(new MavenPackage("group", "artifact", "1.0.0")); A.CallTo(() => remoteRepository.OpenRead(A <string> ._)).MustNotHaveHappened(); }