public void Write20AsLatestVersion()
        {
            var userAgent = ".NET CLR 2.0";

            var expectedVersion = generateLatestVersionString(2, 0, "full", null);

            var actualVersion = JsonVersions.WriteLatestVersions(userAgent);

            Assert.AreEqual(expectedVersion, actualVersion);
        }
        public void Write35AsLatestVersion()
        {
            var userAgent = ".NET CLR 3.5.21022";

            var expectedVersion = generateLatestVersionString(3, 5, "full", null);

            var actualVersion = JsonVersions.WriteLatestVersions(userAgent);

            Assert.AreEqual(expectedVersion, actualVersion);
        }
        public void Write40ClientAsLatestVersion()
        {
            var userAgent = ".NET4.0C; .NET CLR 2.0";

            var expectedVersion = generateLatestVersionString(4, 0, "client", null);

            var actualVersion = JsonVersions.WriteLatestVersions(userAgent);

            Assert.AreEqual(expectedVersion, actualVersion);
        }
        public void Write35SP1ClientAsLatestVersion()
        {
            var userAgent = ".NET Client 3.5";

            var expectedVersion = generateLatestVersionString(3, 5, "client", 1);

            var actualVersion = JsonVersions.WriteLatestVersions(userAgent);

            Assert.AreEqual(expectedVersion, actualVersion);
        }
        public void WriteNullAsLatestVersion()
        {
            var userAgent = "";

            var expectedVersion = "SmallestDotNet.latestVersion = null;";

            var actualVersion = JsonVersions.WriteLatestVersions(userAgent);

            Assert.AreEqual(expectedVersion, actualVersion);
        }