public void WrongExtensionTypeTreatedAsUnknown() { // Test that fields of the wrong wire type are treated like unknown fields // when parsing extensions. ByteString bizarroData = GetBizarroData(); TestAllExtensions allExtensionsMessage = TestAllExtensions.ParseFrom(bizarroData); TestEmptyMessage emptyMessage = TestEmptyMessage.ParseFrom(bizarroData); // All fields should have been interpreted as unknown, so the debug strings // should be the same. Assert.AreEqual(emptyMessage.ToString(), allExtensionsMessage.ToString()); }