Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void PersonBehavior() {
- Person p("ivan"s, 17);
- ASSERT_EQUAL(p.GetDanceCount(), 0);
- ASSERT_EQUAL(p.GetSatisfaction(), 100);
- p.LiveADay();
- ASSERT_EQUAL(p.GetDanceCount(), 0);
- ASSERT_EQUAL(p.GetSatisfaction(), 100);
- p.Dance();
- ASSERT_EQUAL(p.GetDanceCount(), 1);
- ASSERT_EQUAL(p.GetSatisfaction(), 100 + 1);
- p.LiveADay();
- ASSERT_EQUAL(p.GetDanceCount(), 1);
- ASSERT_EQUAL(p.GetSatisfaction(), 100 + 1);
- p.Dance();
- p.Dance();
- ASSERT_EQUAL(p.GetDanceCount(), 3);
- ASSERT_EQUAL(p.GetSatisfaction(), 100 + 3);
- p.LiveADay();
- ASSERT_EQUAL(p.GetDanceCount(), 3);
- ASSERT_EQUAL(p.GetSatisfaction(), 100 + 3);
- const auto& p_c = p;
- ASSERT_EQUAL(p_c.GetDanceCount(), 3);
- ASSERT_EQUAL(p_c.GetSatisfaction(), 100 + 3);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement