Like the title, I need to create a BLOB object for my unit test.
I read this
But it needs to connect to a specific database.
Thank you for taking a look.
Like the title, I need to create a BLOB object for my unit test.
I read this
But it needs to connect to a specific database.
Thank you for taking a look.
Since BLOB is an expensive resource and you are doing a test, mocking is a great way to create a BLOB.
Also with this, you can control what the BLOB is without actually reading through a large object.
How to do it depends entirely on the testing framework you are using. Example, this is how it is done in Mockito: Blob blob = mock(Blob.class);
BLOBis aninterface, you could create your own mock/proxy which will facilitate your requirements