File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed
Sources/YCoreUI/Components
Tests/YCoreUITests/Components Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change 88
99import UIKit
1010
11- /// Encapsulate design shadows and apply them to view.
11+ /// Encapsulates design shadows and apply them to view.
1212public struct Elevation {
1313 /// The offset of the layer’s shadow.
1414 public let offset : CGSize
15- /// The blur of the layer's. shadow.
15+ /// The blur of the layer's shadow.
1616 public let blur : CGFloat
1717 /// The spread of the layer's shadow.
1818 public let spread : CGFloat
@@ -50,7 +50,7 @@ public struct Elevation {
5050 /// Applies elevation to a layer.
5151 /// - Parameters:
5252 /// - layer: layer of the corresponding view
53- /// - cornerRadius: the radius to use when drawing rounded corners for the layer’s background.
53+ /// - cornerRadius: the radius to use when drawing rounded corners for the layer’s background
5454 public func apply( layer: CALayer , cornerRadius: CGFloat ) {
5555 applyShadow ( layer: layer)
5656
Original file line number Diff line number Diff line change @@ -33,19 +33,17 @@ final class ElevationTests: XCTestCase {
3333 XCTAssertEqual ( sut. useShadowPath, true )
3434 }
3535
36- func test_apply_doesNotAddShadowPathWhenUseShadowPathIsFalse ( ) {
36+ func test_apply_doesNotsetShadowPathWhenUseShadowPathIsFalse ( ) {
3737 let sut = makeSUT ( useShadowPath: false )
38-
3938 let layer = CALayer ( )
4039
4140 sut. apply ( layer: layer, cornerRadius: 8 )
4241
4342 XCTAssertNil ( layer. shadowPath)
4443 }
4544
46- func test_apply_addsShadowPathWhenUseShadowPathIsTrue ( ) {
45+ func test_apply_setsShadowPathWhenUseShadowPathIsTrue ( ) {
4746 let sut = makeSUT ( useShadowPath: true )
48-
4947 let layer = CALayer ( )
5048
5149 sut. apply ( layer: layer, cornerRadius: 8 )
@@ -55,7 +53,6 @@ final class ElevationTests: XCTestCase {
5553
5654 func test_apply_setsShadowPropertiesWhenUseShadowPathIsFalse( ) {
5755 let sut = makeSUT ( useShadowPath: false )
58-
5956 let layer = CALayer ( )
6057
6158 sut. apply ( layer: layer, cornerRadius: 8 )
@@ -68,7 +65,6 @@ final class ElevationTests: XCTestCase {
6865
6966 func test_apply_setsShadowPropertiesWhenUseShadowPathIsTrue( ) {
7067 let sut = makeSUT ( useShadowPath: true )
71-
7268 let layer = CALayer ( )
7369
7470 sut. apply ( layer: layer, cornerRadius: 8 )
You can’t perform that action at this time.
0 commit comments