HsacAcceptanceTests.SlimTests.HttpTest.HttpCreateFileFromBase64Test


script mock xml server setup
add response VGhpcyBpcyBhIGZpbGUgdG8gdGVzdCB0aGUgZmlsZSB1cGxvYWQ=
add response {"encoded" : "VGhpcyBpcyBhIGZpbGUgdG8gdGVzdCB0aGUgZmlsZSB1cGxvYWQ="}
add response {"encoded" : "data:text/plain;base64,VGhpcyBpcyBhIGZpbGUgdG8gdGVzdCB0aGUgZmlsZSB1cGxvYWQ="}
$url<-[http://127.0.0.1:8000/FitNesseMock] get mock server url

script xml http test
get from $url->[http://127.0.0.1:8000/FitNesseMock]
$xmlCreated<-[createdFromXml.txt] create file createdFromXml.txt from base64 content of /root

script json http test
get from $url->[http://127.0.0.1:8000/FitNesseMock]
$jsonCreated<-[createdFromJson.txt] create file createdFromJson.txt from base64 content of encoded

script json http test
get from $url->[http://127.0.0.1:8000/FitNesseMock]
$jsonCreated2<-[createdFromJsonDataUrl.txt] create file createdFromJsonDataUrl.txt from base64 content of encoded

script file fixture
check text in $xmlCreated->[createdFromXml.txt] This is a file to test the file upload
check text in $jsonCreated->[createdFromJson.txt] This is a file to test the file upload
check text in $jsonCreated2->[createdFromJsonDataUrl.txt] This is a file to test the file upload

script mock xml server setup
stop