System.Globalization.Tests.TextInfoMiscTests.ReadOnlyTest C# (CSharp) Méthode

ReadOnlyTest() private méthode

private ReadOnlyTest ( ) : void
Résultat void
        public void ReadOnlyTest()
        {
            TextInfo ti = CultureInfo.GetCultureInfo("en-US").TextInfo;
            Assert.True(ti.IsReadOnly, "IsReadOnly should be true with cached TextInfo object");

            ti = (TextInfo) ti.Clone();
            Assert.False(ti.IsReadOnly, "IsReadOnly should be false with cloned TextInfo object");
            
            ti = TextInfo.ReadOnly(ti);
            Assert.True(ti.IsReadOnly, "IsReadOnly should be true with created read-nly TextInfo object");
        }