This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mocking a Blob object?

 
bhavit pant
Greenhorn
Posts: 21
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 34839
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic