Module: TestCases

Defined in:
lib/app.rb

Class Method Summary collapse

Class Method Details

.check_has_bookingObject



16
17
18
19
# File 'lib/app.rb', line 16

def self.check_has_booking
    self.init_isbooked
    return @isBooked.get_booking
end

.check_has_studentObject



6
7
8
9
# File 'lib/app.rb', line 6

def self.check_has_student
    self.init_isbooked
    return @isBooked.get_student
end

.check_has_tutorObject



26
27
28
29
# File 'lib/app.rb', line 26

def self.check_has_tutor
    self.init_isbooked
    return @isBooked.get_tutor
end

.check_if_bookedObject



58
59
60
61
# File 'lib/app.rb', line 58

def self.check_if_booked
    self.init_isbooked
    return @isBooked.checkIfBooked
end

.check_if_dates_booked_has_date_valueObject



53
54
55
56
# File 'lib/app.rb', line 53

def self.check_if_dates_booked_has_date_value
    self.init_isbooked
    return @isBooked.get_dates_booked[0].keys[0]
end

.check_if_dates_booked_is_arrayObject



42
43
44
45
46
# File 'lib/app.rb', line 42

def self.check_if_dates_booked_is_array
    self.init_isbooked
    dates_booked = @isBooked.get_tutor["dates_booked"]
    return dates_booked.class
end

.check_if_dates_booked_is_setObject



48
49
50
51
# File 'lib/app.rb', line 48

def self.check_if_dates_booked_is_set
    self.init_isbooked
    return @isBooked.get_dates_booked
end

.check_if_tutor_has_dates_bookedObject



36
37
38
39
40
# File 'lib/app.rb', line 36

def self.check_if_tutor_has_dates_booked
    self.init_isbooked
    dates_booked = @isBooked.get_tutor["dates_booked"]
    return dates_booked
end

.check_is_booking_hashObject



21
22
23
24
# File 'lib/app.rb', line 21

def self.check_is_booking_hash
    self.init_isbooked
    return @isBooked.get_booking.class
end

.check_is_student_hashObject



11
12
13
14
# File 'lib/app.rb', line 11

def self.check_is_student_hash
    self.init_isbooked
    return @isBooked.get_student.class
end

.check_is_tutor_hashObject



31
32
33
34
# File 'lib/app.rb', line 31

def self.check_is_tutor_hash
    self.init_isbooked
    return @isBooked.get_tutor.class
end

.init_isbookedObject



64
65
66
# File 'lib/app.rb', line 64

def self.init_isbooked
    @isBooked = IsBooked.new(MockDb.student, MockDb.tutor, MockDb.booking)
end