@@ -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