It depends on the teacher. Some of my teachers taught straight from the book, while others only used it for examples. Some, both.
If they work from the book then hopefully they highlighted what they thought was important and you have it in your notes.
If they did not then hopefully you have plenty of notes and can look back at the book to fill in the gaps.
I have had teachers that worked examples from the book, then for the test the teacher would find the hardest example problems from each chapter for the test. It made it really easy to know what to study. But, they were problems never discussed in class. And the teacher couldn't solve them half the time.
The most difficult teachers used the book, their own notes, and then made the test so difficult that you not only had to memorize notes/examples, and most of the chapter, but understand the material thoroughly. Really sucks when it is not a core class
Another test that sucks is when the teacher teaches from memory, the book, and whatever else comes to mind, then the test is not even closely related to the material that was discussed
Glad I am done with all that
Maybe thats why I always prefered math tests. All I had to do was drill problems.