Class: TestGenericGroup

Inherits:
Test::Unit::TestCase
  • Object
show all
Defined in:
test/test_model/genericgroup.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) setup



19
20
21
# File 'test/test_model/genericgroup.rb', line 19

def setup
  @generic_group = ODDB::GenericGroup.new
end

- (Object) test_add_package



22
23
24
25
26
27
# File 'test/test_model/genericgroup.rb', line 22

def test_add_package
  @generic_group.packages = []
  package = StubGenericGroupPackage.new
  @generic_group.add_package(package)
  assert_equal([package], @generic_group.packages)
end

- (Object) test_remove_package



28
29
30
31
32
33
# File 'test/test_model/genericgroup.rb', line 28

def test_remove_package
  package = StubGenericGroupPackage.new
  @generic_group.packages = [package]
  @generic_group.remove_package(package)
  assert_equal([], @generic_group.packages)
end