Class: ODDB::State::TestPageFacade

Inherits:
Test::Unit::TestCase
  • Object
show all
Defined in:
test/test_state/page_facade.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) setup



13
14
15
# File 'test/test_state/page_facade.rb', line 13

def setup
  @page = State::PageFacade.new(7)
end

- (Object) test_next



16
17
18
19
20
21
# File 'test/test_state/page_facade.rb', line 16

def test_next
  result = @page.next
  assert_instance_of(State::PageFacade, result)
  assert_equal(8, result.to_i)
  assert_equal("9", result.to_s)
end

- (Object) test_previous



22
23
24
25
26
27
# File 'test/test_state/page_facade.rb', line 22

def test_previous
  result = @page.previous
  assert_instance_of(State::PageFacade, result)
  assert_equal(6, result.to_i)
  assert_equal("7", result.to_s)
end

- (Object) test_to_i



28
29
30
# File 'test/test_state/page_facade.rb', line 28

def test_to_i
  assert_equal(7, @page.to_i)
end

- (Object) test_to_s



31
32
33
# File 'test/test_state/page_facade.rb', line 31

def test_to_s
  assert_equal("8", @page.to_s) 
end