コード例 #1
0
        public void Basic()
        {
            var table = new JsonNameTable();
            var count = 10000;

            foreach ( var propertyName in Enumerable.Range( 1, count )
                                                    .Select( x => "Property" + x ) )
            {
                table.Add( GetBytes( propertyName ), propertyName );
            }

            foreach ( var propertyName in Enumerable.Range( 1, count )
                                                    .Select( x => "Property" + x ) )
            {
                Assert.Equal( propertyName, table.Find( GetBytes( propertyName ) ) );
            }
        }