use of org.mule.runtime.extension.api.persistence.ExtensionModelJsonSerializer in project mule by mulesoft.
the class ExtensionModelJsonGeneratorTestCase method setup.
@Before
public void setup() throws IOException {
generator = new ExtensionModelJsonSerializer(true);
expectedJson = getResourceAsString("models/" + expectedSource, getClass()).trim();
}
use of org.mule.runtime.extension.api.persistence.ExtensionModelJsonSerializer in project mule by mulesoft.
the class CoreExtensionModelSerializationTestCase method serializeDeserialize.
@Test
public void serializeDeserialize() throws Exception {
ExtensionModel extensionModel = MuleExtensionModelProvider.getExtensionModel();
ExtensionModelJsonSerializer jsonSerializer = new ExtensionModelJsonSerializer(true);
String serialized = jsonSerializer.serialize(extensionModel);
ExtensionModel deserialized = jsonSerializer.deserialize(serialized);
assertThat(extensionModel, equalTo(deserialized));
}
Aggregations