public void FindPackageNormalizesVersionBeforeComparing()
        {
            // Arrange
            var repository = new MockPackageRepository()
            {
                PackageUtility.CreatePackage("B", "1.0.0"),
                PackageUtility.CreatePackage("B", "1.0.0.1")
            };

            // Act
            IPackage package = repository.FindPackage("B", new SemanticVersion("1.0"));

            // Assert
            Assert.Equal("B", package.Id);
            Assert.Equal(new SemanticVersion("1.0.0"), package.Version);
        }
Ejemplo n.º 2
0
        public void FindPackageNormalizesVersionBeforeComparing()
        {
            // Arrange
            var repository = new MockPackageRepository() {
                PackageUtility.CreatePackage("B", "1.0.0"),
                PackageUtility.CreatePackage("B", "1.0.0.1")
            };

            // Act
            IPackage package = repository.FindPackage("B", new SemanticVersion("1.0"));

            // Assert
            Assert.Equal("B", package.Id);
            Assert.Equal(new SemanticVersion("1.0.0"), package.Version);
        }