fn can_diff_primitive_json_and_yield_unspecified_shape() {
  let events: Vec<SpecEvent> = serde_json::from_value(
    json!([
    {"ShapeAdded":{"shapeId":"example_shape_1","baseShapeId":"$string","parameters":{"DynamicParameterList":{"shapeParameterIds":[]}},"name":""}}
  ]),
  ).expect("should be able to deserialize shape added events as spec events");
  let shape_projection = ShapeProjection::from(events);

  assert_debug_snapshot!(
    "can_diff_primitive_json_and_yield_unspecified_shape__shape_projection_graph",
    Dot::with_config(&shape_projection.graph, &[])
  );
  let string_body = json!("a-string");
  let unknown_shape_id = String::from("not-a-shape-id");
  // TODO: consider returning a Result with Err instead of panicking
  let results = diff_shape(
    &shape_projection,
    Some(BodyDescriptor::from(string_body)),
    &unknown_shape_id,
  );
  assert_eq!(results.len(), 1);
  assert_debug_snapshot!(
    "can_diff_primitive_json_and_yield_unspecified_shape__results",
    results
  );
}
// TODO: fix this test of the PrimitiveVisitor yielding an UnspecifiedShape diff:
// this test needs to provide a scenario where there is an object field in the interaction that is not in the spec
fix this test of the PrimitiveVisitor yielding an UnspecifiedShape diff:
this test needs to provide a scenario where there is an object field in the interaction that is not in the spec
fix this test of the PrimitiveVisitor yielding an UnspecifiedShape diff : this test needs to provide a scenario where there is an object field in the interaction that is not in the spec
fn can_diff_primitive_json_and_yield_unspecified_shape() {
  let events: Vec<SpecEvent> = serde_json::from_value(
    json!([
    {"ShapeAdded":{"shapeId":"example_shape_1","baseShapeId":"$string","parameters":{"DynamicParameterList":{"shapeParameterIds":[]}},"name":""}}
  ]),
  ).expect("should be able to deserialize shape added events as spec events");
  let shape_projection = ShapeProjection::from(events);
  assert_debug_snapshot!(
    "can_diff_primitive_json_and_yield_unspecified_shape__shape_projection_graph",
    Dot::with_config(&shape_projection.graph, &[])
  );
  let string_body = json!("a-string");
  let unknown_shape_id = String::from("not-a-shape-id");
  // TODO: consider returning a Result with Err instead of panicking
  let results = diff_shape(
    &shape_projection,
    Some(BodyDescriptor::from(string_body)),
    &unknown_shape_id,
  );
  assert_eq!(results.len(), 1);
  assert_debug_snapshot!(
    "can_diff_primitive_json_and_yield_unspecified_shape__results",
    results
  );
}
fn can_diff_primitive_json_and_yield_unspecified_shape ( ) { let events : Vec < SpecEvent > = serde_json :: from_value ( json ! ( [ { " " { " " " " " " " " " " { " " { " " [ ] } } " " " " } } ] ) , ) . expect ( " " ) ; let shape_projection = ShapeProjection :: from ( events ) ; assert_debug_snapshot ! ( " " Dot with_config ( shape_projection graph [ ] ) ) ; let string_body = json ! ( " " ) ; let unknown_shape_id = String :: from ( " " ) ; // TODO: consider returning a Result with Err instead of panicking let results = diff_shape ( & shape_projection , Some ( BodyDescriptor :: from ( string_body ) ) , & unknown_shape_id , ) ; assert_eq ! ( results len ( ) 1 ) ; assert_debug_snapshot ! ( " " results ) ; }
TODO: fix this test of the PrimitiveVisitor yielding an UnspecifiedShape diff:
this test needs to provide a scenario where there is an object field in the interaction that is not in the spec
TODO : fix this test of the PrimitiveVisitor yielding an UnspecifiedShape diff : this test needs to provide a scenario where there is an object field in the interaction that is not in the spec