System.Globalization.Tests.IdnMappingGetAsciiTests.TestGetAsciiWithDot C# (CSharp) Method

TestGetAsciiWithDot() private method

private TestGetAsciiWithDot ( ) : void
return void
        public void TestGetAsciiWithDot()
        {
            string result = "";
            Exception ex = Record.Exception(()=> result = new IdnMapping().GetAscii("."));
            if (ex == null)
            {
                // Windows and OSX always throw exception. some versions of Linux succeed and others throw exception
                Assert.False(RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
                Assert.False(RuntimeInformation.IsOSPlatform(OSPlatform.OSX));
                Assert.Equal(result, ".");
            }
            else
            {
                Assert.IsType<ArgumentException>(ex);                
            }
        }