示例#1
0
        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();
        }
示例#2
0
        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();
        }
示例#3
0
        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();
        }