tests/STONWritePrettyPrinterReadTests.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Tue, 04 Jun 2019 12:33:53 +0100
changeset 0 8f9f6be6af89
permissions -rw-r--r--
Initial port from Pharo Based on 305ae856d4b551 from https://github.com/svenvc/ston.git

"{ Package: 'stx:goodies/ston/tests' }"

"{ NameSpace: Smalltalk }"

STONWriteReadTests subclass:#STONWritePrettyPrinterReadTests
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'STON-Tests-Write-Read'
!

!STONWritePrettyPrinterReadTests methodsFor:'private'!

serialize: anObject
	^ String streamContents: [ :stream |
		STON writer 
			on: stream; 
			prettyPrint: true;
			nextPut: anObject ]
!

serializeJson: anObject
	^ String streamContents: [ :stream |
		STON jsonWriter 
			on: stream; 
			prettyPrint: true;
			nextPut: anObject ]
! !