docstr: Test the Feature class
code: def test_feature_class(self):
      """
      Test the Feature class
      """
  
      from geojson.examples import SimpleWebFeature
  
      feature = SimpleWebFeature(
          id="1",
          geometry={"type": "Point", "coordinates": [53.0, -4.0]},
          title="Feature 1",
          summary="The first feature",
          link="http://example.org/features/1",
      )
  
      # It satisfies the feature protocol
      self.assertEqual(feature.id, "1")
      self.assertEqual(feature.properties["title"], "Feature 1")
      self.assertEqual(
          feature.properties["summary"], "The first feature"
      )
      self.assertEqual(
          feature.properties["link"], "http://example.org/features/1"
      )
      self.assertEqual(
          geojson.dumps(feature.geometry, sort_keys=True),
          '{"coordinates": [53.0, -4.0], "type": "Point"}',
      )
  
      # Encoding
      json = (
          '{"geometry": {"coordinates": [53.0, -4.0],'
          ' "type": "Point"},'
          ' "id": "1",'
          ' "properties":'
          ' {"link": "http://example.org/features/1",'
          ' "summary": "The first feature",'
          ' "title": "Feature 1"},'
          ' "type": "Feature"}'
      )
      self.assertEqual(geojson.dumps(feature, sort_keys=True), json)
  
      # Decoding
      factory = geojson.examples.create_simple_web_feature
      json = (
          '{"geometry": {"type": "Point",'
          ' "coordinates": [53.0, -4.0]},'
          ' "id": "1",'
          ' "properties": {"summary": "The first feature",'
          ' "link": "http://example.org/features/1",'
          ' "title": "Feature 1"}}'
      )
      feature = geojson.loads(json, object_hook=factory)
      self.assertEqual(
          repr(type(feature)),
          "<class 'geojson.examples.SimpleWebFeature'>",
      )
      self.assertEqual(feature.id, "1")
      self.assertEqual(feature.properties["title"], "Feature 1")
      self.assertEqual(
          feature.properties["summary"], "The first feature"
      )
      self.assertEqual(
          feature.properties["link"], "http://example.org/features/1"
      )
      self.assertEqual(
          geojson.dumps(feature.geometry, sort_keys=True),
          '{"coordinates": [53.0, -4.0], "type": "Point"}',
      )
  
file_path: geojson/tests/test_features.py
imports: from io import StringIO
  import unittest
  import geojson
label_desc: Use image node_id 3 for calling the FeaturesTest obj's underlying member method code with example usage: obj.test_feature_class() without return types