Excepted instance class.
The object it should be instance of specific class.
The exception message.
The file name that the assert failed in. Should be left as default.
The file line that the assert failed in. Should be left as default.
If object is not instance of class, will throw an UnitTestException.
1 interface DummyInterface 2 { 3 public: 4 void test(); 5 } 6 7 class Dummy: DummyInterface 8 { 9 public: 10 override test() 11 { 12 } 13 } 14 15 auto a = new Dummy; 16 auto b = cast(DummyInterface) a; 17 b.shouldBeInstanceOf!Dummy();
Used to assert that object is instance of class.