Get help with testing, discuss unit testing strategies etc.


Post by WebTrauma »

Hi,

I have a singleton that extends Observable and want to unit test it using Siesta.

How do I make the test harness aware of the singleton since it will not have the entire application context ?

It doesn't like direct references to the class name like MyProject.bloog.MySingleton.getFracking() for obvious reasons (no context), but I can't instantiate it with new or this.global.Ext.create() either.

Please advise.

Thanks.

Post by nickolay »

Hi,

You mean how you can access it from the test class methods? Its something like: "this.global.MyProject.MySingleton".

When accessing from the test file it will be just "MyProject.MySingleton".

Post Reply