public void RuntimeInformationTest()
        {
            var runtime = InternalSDKUtils.DetermineRuntime();

            Assert.NotEqual("Unknown", runtime);
            Assert.False(runtime.Contains(" "));

            var framework = InternalSDKUtils.DetermineFramework();

            Assert.NotEqual("Unknown", framework);
            Assert.False(framework.Contains(" "));

            var os = InternalSDKUtils.DetermineOS();

            Assert.NotEqual("Unknown", os);
            Assert.False(os.Contains(" "));

            var osver = InternalSDKUtils.DetermineOSVersion();

            Assert.NotEqual("Unknown", osver);
            Assert.False(osver.Contains(" "));

            var platform = InternalSDKUtils.PlatformUserAgent();

            Assert.NotEqual("Unknown", platform);
            Assert.False(platform.Contains(" "));

            Assert.Equal(platform, os + "_" + osver);
            Assert.Equal(RuntimeInformation.FrameworkDescription.Trim().Replace(' ', '_'), runtime + "_" + framework);
        }
Exemplo n.º 2
0
 public EnvironmentInfo()
 {
     this.Platform          = InternalSDKUtils.DetermineOS();
     this.PlatformVersion   = InternalSDKUtils.DetermineOSVersion();
     this.PlatformUserAgent = InternalSDKUtils.PlatformUserAgent();
     this.Model             = "Unknown";
     this.Make               = "Unknown";
     this.Locale             = CultureInfo.CurrentCulture.DisplayName;
     this.FrameworkUserAgent =
         string.Format(CultureInfo.InvariantCulture,
                       ".NET_Core/{0}",
                       InternalSDKUtils.DetermineFramework());
     this.PclPlatform = string.Empty;
 }
Exemplo n.º 3
0
        public void RuntimeInformationTest()
        {
            var framework = InternalSDKUtils.DetermineFramework();

            Assert.NotEqual("Unknown", framework);
            Assert.False(framework.Contains(" "));

            var os = InternalSDKUtils.DetermineOS();

            Assert.NotEqual("Unknown", os);
            Assert.False(os.Contains(" "));

            var platform = InternalSDKUtils.PlatformUserAgent();

            Assert.NotEqual("Unknown", platform);
            Assert.False(platform.Contains(" "));
        }
Exemplo n.º 4
0
 public EnvironmentInfo()
 {
     this.Platform           = InternalSDKUtils.DetermineOS();
     this.PlatformUserAgent  = InternalSDKUtils.PlatformUserAgent();
     this.FrameworkUserAgent = InternalSDKUtils.DetermineFramework();
 }