Class: Quark::Quark::Test::MethodTest
Constant Summary
DatawireQuarkCore::Static::Unassigned
Instance Attribute Summary collapse
Instance Method Summary
collapse
_lazy_statics, static, unlazy_statics
Constructor Details
#initialize(klass, method) ⇒ MethodTest
378
379
380
381
382
383
384
385
|
# File 'lib/quark/test.rb', line 378
def initialize(klass, method)
super(((klass.getName()) + (".")) + (method.getName()))
(self).klass = klass
(self).method = method
nil
end
|
Instance Attribute Details
#klass ⇒ Object
Returns the value of attribute klass.
371
372
373
|
# File 'lib/quark/test.rb', line 371
def klass
@klass
end
|
#method ⇒ Object
Returns the value of attribute method.
371
372
373
|
# File 'lib/quark/test.rb', line 371
def method
@method
end
|
Instance Method Details
#__init_fields__ ⇒ Object
474
475
476
477
478
479
480
481
|
# File 'lib/quark/test.rb', line 474
def __init_fields__()
super
self.klass = nil
self.method = nil
nil
end
|
#_getClass ⇒ Object
412
413
414
415
416
417
|
# File 'lib/quark/test.rb', line 412
def _getClass()
return "quark.test.MethodTest"
nil
end
|
#_getField(name) ⇒ Object
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
|
# File 'lib/quark/test.rb', line 419
def _getField(name)
if ((name) == ("ctx"))
return ::Quark.quark.test.Test.ctx
end
if ((name) == ("name"))
return (self).name
end
if ((name) == ("checks"))
return (self).checks
end
if ((name) == ("successes"))
return (self).successes
end
if ((name) == ("failures"))
return (self).failures
end
if ((name) == ("klass"))
return (self).klass
end
if ((name) == ("method"))
return (self).method
end
return nil
nil
end
|
#_setField(name, value) ⇒ Object
#run ⇒ Object
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
|
# File 'lib/quark/test.rb', line 390
def run()
setup = @klass.getMethod("setup")
teardown = @klass.getMethod("teardown")
test = @klass.construct(::DatawireQuarkCore::List.new([]))
if ((setup) != (nil))
if (!(::Quark.quark.test.SafeMethodCaller.callMethod(setup, test)))
::Quark.quark.test.fail("setup invocation crashed")
end
end
if (!(::Quark.quark.test.SafeMethodCaller.callMethod(@method, test)))
::Quark.quark.test.fail("test invocation crashed")
end
if ((teardown) != (nil))
if (!(::Quark.quark.test.SafeMethodCaller.callMethod(teardown, test)))
::Quark.quark.test.fail("teardown invocation crashed")
end
end
nil
end
|