-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #108 from arton/fix_105
fix #105 add extra parameter to invoke_by_instance
- Loading branch information
Showing
4 changed files
with
51 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package jp.co.infoseek.hp.arton.rjb; | ||
public class Test105 { | ||
public String test; | ||
public Test105(String test) { | ||
this.test = test; | ||
} | ||
public String test() { | ||
return "method_" + test; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
begin | ||
require 'rjb' | ||
rescue LoadError | ||
require 'rubygems' | ||
require 'rjb' | ||
end | ||
require 'test/unit' | ||
|
||
class Test105 < Test::Unit::TestCase | ||
include Rjb | ||
def setup | ||
Rjb::load('.') | ||
@test105 = import('jp.co.infoseek.hp.arton.rjb.Test105') | ||
end | ||
|
||
def test_field | ||
test = @test105.new('xyz') | ||
assert_equal('xyz', test.test) | ||
end | ||
|
||
def test_method | ||
test = @test105.new('xyz') | ||
ret = test._invoke('test') | ||
assert_equal('method_xyz', ret) | ||
end | ||
end | ||
|
||
|