simplify history recording task
[gitmo/moose-presentations.git] / moose-class / exercises / t / 01-classes.t
1 # Your tasks ...
2 #
3 # Create a Person class in lib/Person.pm
4 #
5 # A Person has the following attributes:
6 #
7 # * first_name - read-write
8 # * last_name - read-write
9 #
10 # This class should also have a method named "full_name". This
11 # method should return the first and last name separated by a string
12 # ("Jon Smith").
13 #
14 # Write a BUILDARGS method for this class which allows the caller to
15 # pass a two argument array reference. These should be assigned to the
16 # first and last name respectively.
17 #
18 #   Person->new( [ 'Lisa', 'Smith' ] );
19 #
20 # Create an Employee class in lib/Employee.pm
21 #
22 # The Employee class is a subclass of Person
23 #
24 # An Employee has the following read-write attributes:
25 #
26 # * title - read-write
27 # * salary - read-write
28 # * ssn - read-only
29 #
30 # The Employee class should override the "full_name" method to
31 # append the employee's title in parentheses ("Jon Smith
32 # (Programmer)"). Use override() and super() for this.
33 #
34 # Finally, both classes should be free of Moose droppings, and should be
35 # immutable.
36
37 use strict;
38 use warnings;
39
40 use lib 't/lib';
41
42 use MooseClass::Tests;
43
44 use Person;
45 use Employee;
46
47 MooseClass::Tests::tests01();