Skip to content

Commit d85de7b

Browse files
committed
๐Ÿงช tests: Update TimetablePainterTests to remove redundant parameters
1 parent 3b8eefa commit d85de7b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

โ€ŽSNUTT/Modules/Feature/TimetableUIComponents/Tests/TimetablePainterTests.swiftโ€Ž

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,16 @@ struct TimetablePainterTests {
2020
func weekWidth() {
2121
let painter = TimetablePainter.stub()
2222
let containerSize = CGSize(width: 320, height: 600)
23-
let weekWidth = painter.getWeekWidth(in: containerSize, weekCount: 5)
23+
let weekWidth = painter.getWeekWidth(in: containerSize)
2424
#expect(weekWidth == CGFloat(320 - 20) / 5)
2525
}
2626

2727
@Test("์ปจํ…Œ์ด๋„ˆ์—์„œ ์‹œ๊ฐ„ ๋†’์ด๋ฅผ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ๊ณ„์‚ฐํ•ด์•ผ ํ•œ๋‹ค")
2828
func hourHeight() {
29-
let painter = TimetablePainter.stub()
29+
let configuration = TimetableConfiguration(minHour: 9, maxHour: 18, autoFit: false)
30+
let painter = TimetablePainter.stub(configuration: configuration)
3031
let containerSize = CGSize(width: 320, height: 600)
31-
let hourHeight = painter.getHourHeight(in: containerSize, hourCount: 10)
32+
let hourHeight = painter.getHourHeight(in: containerSize)
3233
#expect(hourHeight == CGFloat(600 - 25) / 10)
3334
}
3435

@@ -51,7 +52,7 @@ struct TimetablePainterTests {
5152
let containerSize = CGSize(width: 320, height: 600)
5253
let timePlace = TimePlace.stub(day: .mon, startHour: 9, endHour: 11)
5354
let height = painter.getHeight(of: timePlace, in: containerSize)
54-
let expectedHeight = 2.0 * painter.getHourHeight(in: containerSize, hourCount: painter.hourCount)
55+
let expectedHeight = 2.0 * painter.getHourHeight(in: containerSize)
5556
#expect(height == expectedHeight)
5657
}
5758

@@ -147,7 +148,7 @@ struct TimetablePainterTests {
147148
let timePlace = TimePlace.stub(day: .mon, startHour: 8, endHour: 11)
148149
let height = painter.getHeight(of: timePlace, in: containerSize)
149150
/// 3์‹œ๊ฐ„์งœ๋ฆฌ ๊ฐ•์˜์ด์ง€๋งŒ ์ž˜๋ ค์„œ 2์‹œ๊ฐ„์น˜ ๋†’์ด๋ฅผ ๋ฐ˜ํ™˜ํ•ด์•ผ ํ•œ๋‹ค.
150-
let expectedHeight = 2.0 * painter.getHourHeight(in: containerSize, hourCount: painter.hourCount)
151+
let expectedHeight = 2.0 * painter.getHourHeight(in: containerSize)
151152
#expect(height == expectedHeight)
152153
}
153154

0 commit comments

Comments
ย (0)