public void AsODataPackage_PicksCorrectLatestProperties(
            bool v1AbsLatest,
            bool v1Latest,
            bool v2AbsLatest,
            bool v2Latest,
            int level,
            bool expectedAbsLatest,
            bool expectedLatest)
        {
            // Arrange
            var package = new ServerPackage
            {
                Version = new SemanticVersion("0.1.0-rc.1"),
                Authors = Enumerable.Empty <string>(),
                Owners  = Enumerable.Empty <string>(),

                SemVer1IsAbsoluteLatest = v1AbsLatest,
                SemVer1IsLatest         = v1Latest,
                SemVer2IsAbsoluteLatest = v2AbsLatest,
                SemVer2IsLatest         = v2Latest,
            };
            var semVerLevel = new SemanticVersion(level, minor: 0, build: 0, specialVersion: null);

            // Act
            var actual = package.AsODataPackage(new ClientCompatibility(semVerLevel));

            // Assert
            Assert.Equal(expectedAbsLatest, actual.IsAbsoluteLatestVersion);
            Assert.Equal(expectedLatest, actual.IsLatestVersion);
        }
        public void AsODataPackage_UsesCreatedForListedPublished()
        {
            // Arrange
            var package = new ServerPackage
            {
                Version = new SemanticVersion("0.1.0"),
                Authors = Enumerable.Empty <string>(),
                Owners  = Enumerable.Empty <string>(),

                Listed  = true,
                Created = new DateTimeOffset(2017, 11, 29, 21, 21, 32, TimeSpan.FromHours(-8)),
            };

            // Act
            var actual = package.AsODataPackage(ClientCompatibility.Max);

            // Assert
            Assert.Equal(
                new DateTime(2017, 11, 30, 5, 21, 32, DateTimeKind.Utc),
                actual.Published);
        }