Exemple #1
0
        public void ReturnPassedFrameworkDescriptionIfItDoesNotStartWithKeyword(string runtimeDescription)
        {
            // Keyword for runtimeDescription = ".NET Core"
            var frameworkInfo = UserAgentHelper.GetFrameworkDescription(runtimeDescription);

            frameworkInfo.Should().Be(runtimeDescription);
        }
Exemple #2
0
        public void ReturnPassedFrameworkDescriptionWhenAssemblyCodeBaseContainsKeywordButNotVersion()
        {
            // Keyword for runtimeDescription = ".NET Core"
            // Keyword for codeBase = "Microsoft.NETCore.App"
            var frameworkInfo = UserAgentHelper.GetFrameworkDescription(".NET Core foo", "foo/Microsoft.NETCore.App");

            frameworkInfo.Should().Be(".NET Core foo");
        }
Exemple #3
0
        public void ReturnPassedFrameworkDescriptionWhenAssemblyCodeBaseDoesNotContainKeyword(string runtimeAssemblyCodeBase)
        {
            // Keyword for runtimeDescription = ".NET Core"
            // Keyword for codeBase = "Microsoft.NETCore.App"
            var frameworkInfo = UserAgentHelper.GetFrameworkDescription(".NET Core foo", runtimeAssemblyCodeBase);

            frameworkInfo.Should().Be(".NET Core foo");
        }
Exemple #4
0
        public void ReturnNormalizedFrameworkDescriptionWhenItStartsWithKeywordAndCodeBaseHasKeyword(string runtimeAssemblyCodeBase, string expectedVersion)
        {
            // Keyword for runtimeDescription = ".NET Core"
            // Keyword for codeBase = "Microsoft.NETCore.App"
            var frameworkInfo = UserAgentHelper.GetFrameworkDescription(".NET Core", runtimeAssemblyCodeBase);

            frameworkInfo.Should().Be($".NET Core {expectedVersion}");
        }