import XCTest
@testable import Physarum
final class CaptureStartTests: XCTestCase {
func testStillAlwaysUsesSnapshotWhenAvailable() {
XCTAssertEqual(resolveCaptureStart(isVideo: false, videoFromScratch: false, hasSnapshot: true), .fromLiveState)
XCTAssertEqual(resolveCaptureStart(isVideo: false, videoFromScratch: true, hasSnapshot: true), .fromLiveState)
}
func testVideoHonorsToggle() {
XCTAssertEqual(resolveCaptureStart(isVideo: true, videoFromScratch: false, hasSnapshot: true), .fromLiveState)
XCTAssertEqual(resolveCaptureStart(isVideo: true, videoFromScratch: true, hasSnapshot: true), .fromScratch)
}
func testNoSnapshotAlwaysFromScratch() {
XCTAssertEqual(resolveCaptureStart(isVideo: false, videoFromScratch: false, hasSnapshot: false), .fromScratch)
XCTAssertEqual(resolveCaptureStart(isVideo: true, videoFromScratch: false, hasSnapshot: false), .fromScratch)
}
}