Flight Crew Air Transport Pilot (ATP)
Situational Awareness
ATC Issue All Types; Conflict NMAC
Flight Crew FLC complied w / Automation / Advisory; Flight Crew Took Evasive Action
Procedure; Human Factors; Environment - Non Weather Related
Departed FAT; flew runway heading and cleared to 10;000 feet on departure. We were given direct to FRAME by departure and once established direct and climbing through 7;000 feet we simultaneously received a traffic call from ATC and an resolution advisory (RA) to descend. I began to comply with the RA and gained visual contact with a white and red Cessna.  As soon as we were established in a descending maneuver the Cessna began a right turn towards our aircraft and the TCAS gave us an RA to climb. I arrested the descent and began to climb.  I could see visually that the climb and current heading would cause us to [hit] the Cessna and made a right turn off course in addition to the climb to avoid a collision. The aircraft passed a few hundred feet off our left side and we received the 'clear of conflict' from TCAS. Captain advised ATC of the deviation and we were instructed to turn back direct to FRAME and given a frequency change.   ATC was extremely late advising us of conflicting traffic. In fact the traffic call was almost simultaneous with the RA.  It appeared visually to me that the descending maneuver would have worked to keep us clear but as soon as the Cessna turned towards us and the TCAS reversed its command to a climb it appeared to put us back on a collision course with the Cessna forcing a turn to the right in addition to the climb to avoid a collision.
[Report Narrative Contained No Additional Information].
CRJ-900 flight crew reported an NMAC with a Cessna during departure from FAT.