aspose file tools*
The moose likes Testing and the fly likes Mocking a Blob object? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Mocking a Blob object?" Watch "Mocking a Blob object?" New topic
Author

Mocking a Blob object?

bhavit pant
Greenhorn

Joined: May 22, 2012
Posts: 21

hey guys, i need to mock a blob data in XML. which is defined as

How can i Mock it . i have to use a Mock database as Xml
i am using Junit/ (DjUnit for Coverage)
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30537
    
150

You could have your XML point to an actual binary file. Of you could write a Java object that reads an XML file. Or you could jump binary data into a string in your XML. Which is best depends on how you are using the XML file.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Mocking a Blob object?