[ActionSheet] Update all test and example files to match conventions. PiperOrigin-RevId: 334822431
diff --git a/components/ActionSheet/examples/ActionSheetComparisonExample.m b/components/ActionSheet/examples/ActionSheetComparisonExample.m index 722481a..e10dccf 100644 --- a/components/ActionSheet/examples/ActionSheetComparisonExample.m +++ b/components/ActionSheet/examples/ActionSheetComparisonExample.m
@@ -22,7 +22,7 @@ #import "MaterialContainerScheme.h" #import "MaterialTypographyScheme.h" -@interface ActionSheetComparisonExampleViewController : UIViewController +@interface ActionSheetComparisonExample : UIViewController @property(nonatomic, strong) MDCButton *showMaterialButton; @property(nonatomic, strong) MDCButton *showUIKitButton; @@ -30,7 +30,7 @@ @end -@implementation ActionSheetComparisonExampleViewController +@implementation ActionSheetComparisonExample - (instancetype)init { self = [super init]; @@ -135,7 +135,7 @@ @end -@implementation ActionSheetComparisonExampleViewController (CatalogByConvention) +@implementation ActionSheetComparisonExample (CatalogByConvention) + (NSDictionary *)catalogMetadata { return @{
diff --git a/components/ActionSheet/examples/ActionSheetTypalUseSwiftExample.swift b/components/ActionSheet/examples/ActionSheetTypalUseSwiftExample.swift index 6fe199f..1357e77 100644 --- a/components/ActionSheet/examples/ActionSheetTypalUseSwiftExample.swift +++ b/components/ActionSheet/examples/ActionSheetTypalUseSwiftExample.swift
@@ -13,19 +13,17 @@ // limitations under the License. import UIKit - +import MaterialComponents.MaterialActionSheet +import MaterialComponents.MaterialActionSheet_Theming import MaterialComponents.MaterialAppBar import MaterialComponents.MaterialColorScheme import MaterialComponents.MaterialContainerScheme import MaterialComponents.MaterialTypographyScheme -import MaterialComponents.MaterialActionSheet -import MaterialComponents.MaterialActionSheet_Theming - -class ActionSheetTypicalUseSwiftExampleViewController: UIViewController { +class ActionSheetTypicalUseSwiftExample: UIViewController { @objc var containerScheme: MDCContainerScheming = MDCContainerScheme() - + let tableView = UITableView() enum ActionSheetExampleType { case typical, title, message, noIcons, titleAndMessage, dynamicType, delayed, thirtyOptions @@ -39,7 +37,7 @@ ("With Title and Message", .titleAndMessage), ("Dynamic Type Enabled", .dynamicType), ("Delayed", .delayed), - ("Thirty Options", .thirtyOptions) + ("Thirty Options", .thirtyOptions), ] let cellIdentifier = "BaseCell" @@ -64,19 +62,19 @@ let actionSheet: MDCActionSheetController switch type { case .typical: - actionSheet = ActionSheetTypicalUseSwiftExampleViewController.typical() + actionSheet = ActionSheetTypicalUseSwiftExample.typical() case .title: - actionSheet = ActionSheetTypicalUseSwiftExampleViewController.title() + actionSheet = ActionSheetTypicalUseSwiftExample.title() case .message: - actionSheet = ActionSheetTypicalUseSwiftExampleViewController.message() + actionSheet = ActionSheetTypicalUseSwiftExample.message() case .noIcons: - actionSheet = ActionSheetTypicalUseSwiftExampleViewController.noIcons() + actionSheet = ActionSheetTypicalUseSwiftExample.noIcons() case .titleAndMessage: - actionSheet = ActionSheetTypicalUseSwiftExampleViewController.titleAndMessage() + actionSheet = ActionSheetTypicalUseSwiftExample.titleAndMessage() case .dynamicType: - actionSheet = ActionSheetTypicalUseSwiftExampleViewController.dynamic() + actionSheet = ActionSheetTypicalUseSwiftExample.dynamic() case .delayed: - actionSheet = ActionSheetTypicalUseSwiftExampleViewController.titleAndMessage() + actionSheet = ActionSheetTypicalUseSwiftExample.titleAndMessage() let action = MDCActionSheetAction(title: "Home", image: UIImage(named: "ic_home")) { _ in print("Second home action") } @@ -90,7 +88,7 @@ actionSheet.contentEdgeInsets = UIEdgeInsets(top: -10, left: 0, bottom: -10, right: 0) } case .thirtyOptions: - actionSheet = ActionSheetTypicalUseSwiftExampleViewController.thirtyOptions() + actionSheet = ActionSheetTypicalUseSwiftExample.thirtyOptions() } actionSheet.applyTheme(withScheme: containerScheme) present(actionSheet, animated: true, completion: nil) @@ -98,7 +96,7 @@ } // MARK: Catalog by Convensions -extension ActionSheetTypicalUseSwiftExampleViewController { +extension ActionSheetTypicalUseSwiftExample { @objc class func catalogMetadata() -> [String: Any] { return [ @@ -110,13 +108,13 @@ } -extension ActionSheetTypicalUseSwiftExampleViewController : UITableViewDelegate { +extension ActionSheetTypicalUseSwiftExample: UITableViewDelegate { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { showActionSheet(data[indexPath.row].type) } } -extension ActionSheetTypicalUseSwiftExampleViewController : UITableViewDataSource { +extension ActionSheetTypicalUseSwiftExample: UITableViewDataSource { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier, for: indexPath) cell.textLabel?.text = data[indexPath.row].label @@ -128,33 +126,42 @@ } } -extension ActionSheetTypicalUseSwiftExampleViewController { +extension ActionSheetTypicalUseSwiftExample { static var actionOne: MDCActionSheetAction { let image = UIImage(named: "ic_home") ?? UIImage() - return MDCActionSheetAction(title: "Home", - image: image) { (_) in - print("Home action") } + return MDCActionSheetAction( + title: "Home", + image: image + ) { (_) in + print("Home action") + } } static var actionTwo: MDCActionSheetAction { let image = UIImage(named: "ic_favorite") ?? UIImage() - return MDCActionSheetAction(title: "Favorite", - image: image) { (_) in - print("Favorite action") } + return MDCActionSheetAction( + title: "Favorite", + image: image + ) { (_) in + print("Favorite action") + } } static var actionThree: MDCActionSheetAction { let image = UIImage(named: "ic_email") ?? UIImage() - return MDCActionSheetAction(title: "Email", - image: image) { (_) in - print("Email action") } + return MDCActionSheetAction( + title: "Email", + image: image + ) { (_) in + print("Email action") + } } static var messageString: String { - return "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur ultricies diam " + - "libero, eget porta arcu feugiat sit amet. Maecenas placerat felis sed risusnmaximus tempus. " + - "Integer feugiat, augue in pellentesque dictum, justo erat ultricies leo, quis eleifend nisi " + - "eros dictum mi. In finibus vulputate eros, in luctus diam auctor in." + return "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur ultricies diam " + + "libero, eget porta arcu feugiat sit amet. Maecenas placerat felis sed risusnmaximus tempus. " + + "Integer feugiat, augue in pellentesque dictum, justo erat ultricies leo, quis eleifend nisi " + + "eros dictum mi. In finibus vulputate eros, in luctus diam auctor in." } static func typical() -> MDCActionSheetController { @@ -174,8 +181,9 @@ } static func message() -> MDCActionSheetController { - let actionSheet = MDCActionSheetController(title: nil, - message: messageString) + let actionSheet = MDCActionSheetController( + title: nil, + message: messageString) actionSheet.addAction(actionOne) actionSheet.addAction(actionTwo) actionSheet.addAction(actionThree) @@ -183,8 +191,9 @@ } static func titleAndMessage() -> MDCActionSheetController { - let actionSheet = MDCActionSheetController(title: "Action Sheet", - message: messageString) + let actionSheet = MDCActionSheetController( + title: "Action Sheet", + message: messageString) actionSheet.addAction(actionOne) actionSheet.addAction(actionTwo) actionSheet.addAction(actionThree) @@ -193,15 +202,21 @@ static func noIcons() -> MDCActionSheetController { let actionSheet = MDCActionSheetController(title: "Action Sheet", message: messageString) - let action1 = MDCActionSheetAction(title: "Home", image: nil, handler: { _ in - print("Home action") - }) - let action2 = MDCActionSheetAction(title: "Favorite", image: nil, handler: { _ in - print("Favorite action") - }) - let action3 = MDCActionSheetAction(title: "Email", image: nil, handler: { _ in - print("Email action") - }) + let action1 = MDCActionSheetAction( + title: "Home", image: nil, + handler: { _ in + print("Home action") + }) + let action2 = MDCActionSheetAction( + title: "Favorite", image: nil, + handler: { _ in + print("Favorite action") + }) + let action3 = MDCActionSheetAction( + title: "Email", image: nil, + handler: { _ in + print("Email action") + }) actionSheet.addAction(action1) actionSheet.addAction(action2) actionSheet.addAction(action3) @@ -212,9 +227,10 @@ let actionSheet = MDCActionSheetController(title: "Action sheet", message: messageString) actionSheet.mdc_adjustsFontForContentSizeCategory = true let image = UIImage(named: "ic_email") ?? UIImage() - let actionThree = MDCActionSheetAction(title: "Email", - image: image, - handler: nil) + let actionThree = MDCActionSheetAction( + title: "Email", + image: image, + handler: nil) actionSheet.addAction(actionOne) actionSheet.addAction(actionTwo) actionSheet.addAction(actionThree) @@ -225,9 +241,10 @@ let actionSheet = MDCActionSheetController(title: "Action sheet", message: messageString) for i in 1...30 { - let action = MDCActionSheetAction(title: "Action \(i)", - image: UIImage(named: "ic_home"), - handler: nil) + let action = MDCActionSheetAction( + title: "Action \(i)", + image: UIImage(named: "ic_home"), + handler: nil) actionSheet.addAction(action) } return actionSheet
diff --git a/components/ActionSheet/examples/ActionSheetTypicalUseExample.m b/components/ActionSheet/examples/ActionSheetTypicalUseExample.m index d48d982..393718f 100644 --- a/components/ActionSheet/examples/ActionSheetTypicalUseExample.m +++ b/components/ActionSheet/examples/ActionSheetTypicalUseExample.m
@@ -22,8 +22,7 @@ #import "MaterialContainerScheme.h" #import "MaterialTypographyScheme.h" -@interface ActionSheetTypicalUseExampleViewController - : UIViewController <MDCActionSheetControllerDelegate> +@interface ActionSheetTypicalUseExample : UIViewController <MDCActionSheetControllerDelegate> @property(nonatomic, strong) MDCButton *showButton; @property(nonatomic, strong) MDCActionSheetController *actionSheet; @@ -31,7 +30,7 @@ @end -@implementation ActionSheetTypicalUseExampleViewController +@implementation ActionSheetTypicalUseExample - (instancetype)init { self = [super init]; @@ -109,7 +108,7 @@ @end -@implementation ActionSheetTypicalUseExampleViewController (CatalogByConvention) +@implementation ActionSheetTypicalUseExample (CatalogByConvention) + (NSDictionary *)catalogMetadata { return @{ @@ -121,7 +120,7 @@ @end -@implementation ActionSheetTypicalUseExampleViewController (SnapshotTestingByConvention) +@implementation ActionSheetTypicalUseExample (SnapshotTestingByConvention) - (void)testDefaults { // Given
diff --git a/components/ActionSheet/tests/unit/MDCActionSheetTestHelper.h b/components/ActionSheet/tests/unit/ActionSheetTestHelpers.h similarity index 96% rename from components/ActionSheet/tests/unit/MDCActionSheetTestHelper.h rename to components/ActionSheet/tests/unit/ActionSheetTestHelpers.h index 50747d7..a12612c 100644 --- a/components/ActionSheet/tests/unit/MDCActionSheetTestHelper.h +++ b/components/ActionSheet/tests/unit/ActionSheetTestHelpers.h
@@ -26,7 +26,7 @@ - (CGFloat)openingSheetHeight; @end -@interface MDCActionSheetTestHelper : NSObject +@interface ActionSheetTestHelpers : NSObject + (NSArray *)colorsToTest;
diff --git a/components/ActionSheet/tests/unit/MDCActionSheetTestHelper.m b/components/ActionSheet/tests/unit/ActionSheetTestHelpers.m similarity index 95% rename from components/ActionSheet/tests/unit/MDCActionSheetTestHelper.m rename to components/ActionSheet/tests/unit/ActionSheetTestHelpers.m index d73f7d9..9a00daa 100644 --- a/components/ActionSheet/tests/unit/MDCActionSheetTestHelper.m +++ b/components/ActionSheet/tests/unit/ActionSheetTestHelpers.m
@@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#import "MDCActionSheetTestHelper.h" +#import "ActionSheetTestHelpers.h" #import <CoreImage/CoreImage.h> #import "../../src/private/MDCActionSheetHeaderView.h" #import "../../src/private/MDCActionSheetItemTableViewCell.h" -@implementation MDCActionSheetTestHelper +@implementation ActionSheetTestHelpers + (NSArray *)colorsToTest { UIColor *rgbColor = [UIColor colorWithRed:(CGFloat)0.7 @@ -52,7 +52,7 @@ + (NSArray<MDCActionSheetItemTableViewCell *> *)getCellsFromActionSheet: (MDCActionSheetController *)actionSheet { NSMutableArray *cellsArray = [[NSMutableArray alloc] init]; - [MDCActionSheetTestHelper addNumberOfActions:10 toActionSheet:actionSheet]; + [ActionSheetTestHelpers addNumberOfActions:10 toActionSheet:actionSheet]; NSUInteger cellsCount = actionSheet.actions.count; UITableView *table = actionSheet.tableView; for (NSUInteger cellIndex = 0; cellIndex < cellsCount; ++cellIndex) {
diff --git a/components/ActionSheet/tests/unit/ActionSheetRippleTests.m b/components/ActionSheet/tests/unit/MDCActionSheetControllerRippleTests.m similarity index 87% rename from components/ActionSheet/tests/unit/ActionSheetRippleTests.m rename to components/ActionSheet/tests/unit/MDCActionSheetControllerRippleTests.m index 24f6501..806df47 100644 --- a/components/ActionSheet/tests/unit/ActionSheetRippleTests.m +++ b/components/ActionSheet/tests/unit/MDCActionSheetControllerRippleTests.m
@@ -15,8 +15,8 @@ #import <XCTest/XCTest.h> #import "../../src/private/MDCActionSheetItemTableViewCell.h" -#import "MDCActionSheetTestHelper.h" #import "MaterialActionSheet.h" +#import "ActionSheetTestHelpers.h" #import "MaterialInk.h" #import "MaterialRipple.h" @@ -31,13 +31,13 @@ /** This class confirms behavior of @c MDCActionSheetController when used with Ripple. */ -@interface ActionSheetRippleTests : XCTestCase +@interface MDCActionSheetControllerRippleTests : XCTestCase @property(nonatomic, strong, nullable) MDCActionSheetController *actionSheetController; @end -@implementation ActionSheetRippleTests +@implementation MDCActionSheetControllerRippleTests - (void)setUp { [super setUp]; @@ -56,7 +56,7 @@ */ - (void)testDefaultRipplePropertiesAreCorrect { // When - NSArray *cells = [MDCActionSheetTestHelper getCellsFromActionSheet:self.actionSheetController]; + NSArray *cells = [ActionSheetTestHelpers getCellsFromActionSheet:self.actionSheetController]; // Then XCTAssertEqualObjects(self.actionSheetController.rippleColor, nil); @@ -76,11 +76,12 @@ - (void)testSettingRippleColor { // When self.actionSheetController.rippleColor = UIColor.redColor; - NSArray *cells = [MDCActionSheetTestHelper getCellsFromActionSheet:self.actionSheetController]; + NSArray *cells = [ActionSheetTestHelpers getCellsFromActionSheet:self.actionSheetController]; // Then for (MDCActionSheetItemTableViewCell *cell in cells) { XCTAssertEqualObjects(cell.rippleTouchController.rippleView.rippleColor, UIColor.redColor); } } + @end
diff --git a/components/ActionSheet/tests/unit/ActionSheetTest.swift b/components/ActionSheet/tests/unit/MDCActionSheetControllerSwiftTests.swift similarity index 91% rename from components/ActionSheet/tests/unit/ActionSheetTest.swift rename to components/ActionSheet/tests/unit/MDCActionSheetControllerSwiftTests.swift index 6d2a55a..b700bfe 100644 --- a/components/ActionSheet/tests/unit/ActionSheetTest.swift +++ b/components/ActionSheet/tests/unit/MDCActionSheetControllerSwiftTests.swift
@@ -15,7 +15,7 @@ import XCTest import MaterialComponents.MaterialActionSheet -class ActionSheetTest: XCTestCase { +class MDCActionSheetControllerSwiftTests: XCTestCase { var actionSheet: MDCActionSheetController! @@ -71,8 +71,11 @@ if let table = tableView { XCTAssertEqual(table.numberOfRows(inSection: section), rowCount) if let dataSource = table.dataSource { - let cell = dataSource.tableView(table, cellForRowAt: IndexPath(row: rowCount - 1, - section: section)) + let cell = dataSource.tableView( + table, + cellForRowAt: IndexPath( + row: rowCount - 1, + section: section)) XCTAssertEqual(cell.accessibilityIdentifier, testIdentifier) } else { XCTFail("No data source") @@ -80,13 +83,13 @@ } else { XCTFail("No table was loaded") } - + } func testDefaultBackgroundColor() { // When let _ = actionSheet.view - + // Then XCTAssertEqual(actionSheet.backgroundColor, .white) XCTAssertEqual(actionSheet.view.backgroundColor, .white) @@ -142,7 +145,7 @@ // Then self.wait(for: [expectation], timeout: 1) - XCTAssertEqual(passedTraitCollection, fakeTraitCollection); - XCTAssertEqual(passedActionSheet, actionSheet); + XCTAssertEqual(passedTraitCollection, fakeTraitCollection) + XCTAssertEqual(passedActionSheet, actionSheet) } }
diff --git a/components/ActionSheet/tests/unit/MDCActionSheetControllerTests.m b/components/ActionSheet/tests/unit/MDCActionSheetControllerTests.m index e7e8c36..13c6d2f 100644 --- a/components/ActionSheet/tests/unit/MDCActionSheetControllerTests.m +++ b/components/ActionSheet/tests/unit/MDCActionSheetControllerTests.m
@@ -16,7 +16,7 @@ #import "../../src/private/MDCActionSheetHeaderView.h" #import "MaterialActionSheet.h" -#import "MDCActionSheetTestHelper.h" +#import "ActionSheetTestHelpers.h" #import "MaterialBottomSheet.h" #import "MaterialShadowElevations.h" @@ -126,7 +126,7 @@ // Given self.actionSheet.message = @"Test message"; - NSArray *colors = [MDCActionSheetTestHelper colorsToTest]; + NSArray *colors = [ActionSheetTestHelpers colorsToTest]; for (UIColor *color in colors) { // When self.actionSheet.messageTextColor = color; @@ -140,7 +140,7 @@ // Given self.actionSheet.title = @"Test title"; - NSArray *colors = [MDCActionSheetTestHelper colorsToTest]; + NSArray *colors = [ActionSheetTestHelpers colorsToTest]; for (UIColor *color in colors) { // When self.actionSheet.titleTextColor = color; @@ -152,7 +152,7 @@ - (void)testCustomBackgroundColor { // Given - NSArray *colors = [MDCActionSheetTestHelper colorsToTest]; + NSArray *colors = [ActionSheetTestHelpers colorsToTest]; for (UIColor *color in colors) { // When self.actionSheet.backgroundColor = color; @@ -291,7 +291,7 @@ self.actionSheet.message = message; // When - [MDCActionSheetTestHelper addNumberOfActions:100 toActionSheet:self.actionSheet]; + [ActionSheetTestHelpers addNumberOfActions:100 toActionSheet:self.actionSheet]; [self.actionSheet.view setNeedsLayout]; [self.actionSheet.view layoutIfNeeded]; return viewRect;
diff --git a/components/ActionSheet/tests/unit/MDCActionSheetThemingTest.m b/components/ActionSheet/tests/unit/MDCActionSheetControllerThemingTests.m similarity index 97% rename from components/ActionSheet/tests/unit/MDCActionSheetThemingTest.m rename to components/ActionSheet/tests/unit/MDCActionSheetControllerThemingTests.m index 29e387d..bfa5fc9 100644 --- a/components/ActionSheet/tests/unit/MDCActionSheetThemingTest.m +++ b/components/ActionSheet/tests/unit/MDCActionSheetControllerThemingTests.m
@@ -39,13 +39,13 @@ @property(nonatomic, strong) MDCInkTouchController *inkTouchController; @end -@interface MDCActionSheetThemingTest : XCTestCase +@interface MDCActionSheetControllerThemingTests : XCTestCase @property(nonatomic, strong) MDCActionSheetController *actionSheet; @property(nonatomic, strong) MDCSemanticColorScheme *colorScheme; @property(nonatomic, strong) MDCContainerScheme *containerScheme; @end -@implementation MDCActionSheetThemingTest +@implementation MDCActionSheetControllerThemingTests - (void)setUp { [super setUp];
diff --git a/components/ActionSheet/tests/unit/MDCActionSheetTableCellTest.m b/components/ActionSheet/tests/unit/MDCActionSheetItemTableViewCellTests.m similarity index 85% rename from components/ActionSheet/tests/unit/MDCActionSheetTableCellTest.m rename to components/ActionSheet/tests/unit/MDCActionSheetItemTableViewCellTests.m index fc708a4..227e36c 100644 --- a/components/ActionSheet/tests/unit/MDCActionSheetTableCellTest.m +++ b/components/ActionSheet/tests/unit/MDCActionSheetItemTableViewCellTests.m
@@ -15,18 +15,18 @@ #import <XCTest/XCTest.h> #import "../../src/private/MDCActionSheetItemTableViewCell.h" -#import "MDCActionSheetTestHelper.h" +#import "ActionSheetTestHelpers.h" @interface MDCActionSheetItemTableViewCell (Testing) @property(nonatomic, strong) UILabel *actionLabel; @property(nonatomic, strong) UIImageView *actionImageView; @end -@interface MDCActionSheetTableCellTest : XCTestCase +@interface MDCActionSheetItemTableViewCellTests : XCTestCase @property(nonatomic, strong) MDCActionSheetController *actionSheet; @end -@implementation MDCActionSheetTableCellTest +@implementation MDCActionSheetItemTableViewCellTests - (void)setUp { [super setUp]; @@ -42,7 +42,7 @@ - (void)testInitializerResultsInExpectedDefaults { // When - NSArray *cells = [MDCActionSheetTestHelper getCellsFromActionSheet:self.actionSheet]; + NSArray *cells = [ActionSheetTestHelpers getCellsFromActionSheet:self.actionSheet]; // Then for (MDCActionSheetItemTableViewCell *cell in cells) { @@ -52,7 +52,7 @@ - (void)testDefaultRenderingMode { // When - NSArray *cells = [MDCActionSheetTestHelper getCellsFromActionSheet:self.actionSheet]; + NSArray *cells = [ActionSheetTestHelpers getCellsFromActionSheet:self.actionSheet]; // Then for (MDCActionSheetItemTableViewCell *cell in cells) { @@ -64,7 +64,7 @@ // When UIImageRenderingMode imageMode = UIImageRenderingModeAlwaysOriginal; self.actionSheet.imageRenderingMode = imageMode; - NSArray *cells = [MDCActionSheetTestHelper getCellsFromActionSheet:self.actionSheet]; + NSArray *cells = [ActionSheetTestHelpers getCellsFromActionSheet:self.actionSheet]; // Then for (MDCActionSheetItemTableViewCell *cell in cells) { @@ -74,7 +74,7 @@ - (void)testDefaultCellActionTextColor { // When - NSArray *cells = [MDCActionSheetTestHelper getCellsFromActionSheet:self.actionSheet]; + NSArray *cells = [ActionSheetTestHelpers getCellsFromActionSheet:self.actionSheet]; // Then for (MDCActionSheetItemTableViewCell *cell in cells) { @@ -85,11 +85,11 @@ - (void)testSetActionTextColor { // When - NSArray *colors = [MDCActionSheetTestHelper colorsToTest]; + NSArray *colors = [ActionSheetTestHelpers colorsToTest]; for (UIColor *color in colors) { self.actionSheet.actionTextColor = color; - NSArray *cells = [MDCActionSheetTestHelper getCellsFromActionSheet:self.actionSheet]; + NSArray *cells = [ActionSheetTestHelpers getCellsFromActionSheet:self.actionSheet]; for (MDCActionSheetItemTableViewCell *cell in cells) { // Then XCTAssertEqualObjects(cell.actionLabel.textColor, color); @@ -99,7 +99,7 @@ - (void)testDefaultCellTintColor { // When - NSArray *cells = [MDCActionSheetTestHelper getCellsFromActionSheet:self.actionSheet]; + NSArray *cells = [ActionSheetTestHelpers getCellsFromActionSheet:self.actionSheet]; // Then for (MDCActionSheetItemTableViewCell *cell in cells) { @@ -110,11 +110,11 @@ - (void)testSetTintColor { // When - NSArray *colors = [MDCActionSheetTestHelper colorsToTest]; + NSArray *colors = [ActionSheetTestHelpers colorsToTest]; for (UIColor *color in colors) { self.actionSheet.actionTintColor = color; - NSArray *cells = [MDCActionSheetTestHelper getCellsFromActionSheet:self.actionSheet]; + NSArray *cells = [ActionSheetTestHelpers getCellsFromActionSheet:self.actionSheet]; for (MDCActionSheetItemTableViewCell *cell in cells) { // Then XCTAssertEqualObjects(cell.actionImageView.tintColor, color); @@ -124,11 +124,11 @@ - (void)testSetRippleColor { // When - NSArray *colors = [MDCActionSheetTestHelper colorsToTest]; + NSArray *colors = [ActionSheetTestHelpers colorsToTest]; for (UIColor *color in colors) { self.actionSheet.rippleColor = color; - NSArray *cells = [MDCActionSheetTestHelper getCellsFromActionSheet:self.actionSheet]; + NSArray *cells = [ActionSheetTestHelpers getCellsFromActionSheet:self.actionSheet]; for (MDCActionSheetItemTableViewCell *cell in cells) { // Then XCTAssertEqualObjects(cell.rippleColor, color); @@ -142,7 +142,7 @@ // When self.actionSheet.actionFont = actionFont; - NSArray *cells = [MDCActionSheetTestHelper getCellsFromActionSheet:self.actionSheet]; + NSArray *cells = [ActionSheetTestHelpers getCellsFromActionSheet:self.actionSheet]; XCTAssertNotEqual(cells.count, 0U); for (MDCActionSheetItemTableViewCell *cell in cells) { // Then @@ -160,7 +160,7 @@ // When [self.actionSheet addAction:action]; MDCActionSheetItemTableViewCell *cell = - [MDCActionSheetTestHelper getCellFromActionSheet:self.actionSheet atIndex:0]; + [ActionSheetTestHelpers getCellFromActionSheet:self.actionSheet atIndex:0]; // Then XCTAssertEqual(cell.actionLabel.accessibilityLabel, action.accessibilityLabel); @@ -179,7 +179,7 @@ // Then MDCActionSheetItemTableViewCell *cell = - [MDCActionSheetTestHelper getCellFromActionSheet:self.actionSheet atIndex:0]; + [ActionSheetTestHelpers getCellFromActionSheet:self.actionSheet atIndex:0]; XCTAssertEqualObjects(cell.actionLabel.textColor, fakeColor); } @@ -205,7 +205,7 @@ self.actionSheet.actionTextColor = fakeControllerColor; // Then - NSArray *cells = [MDCActionSheetTestHelper getCellsFromActionSheet:self.actionSheet]; + NSArray *cells = [ActionSheetTestHelpers getCellsFromActionSheet:self.actionSheet]; for (NSUInteger index = 0; index < cells.count; ++index) { MDCActionSheetItemTableViewCell *cell = cells[index]; if (index == 1) { @@ -231,7 +231,7 @@ // Then MDCActionSheetItemTableViewCell *cell = - [MDCActionSheetTestHelper getCellFromActionSheet:self.actionSheet atIndex:0]; + [ActionSheetTestHelpers getCellFromActionSheet:self.actionSheet atIndex:0]; XCTAssertEqualObjects(cell.actionLabel.textColor, fakeColor); } @@ -248,7 +248,7 @@ // Then MDCActionSheetItemTableViewCell *cell = - [MDCActionSheetTestHelper getCellFromActionSheet:self.actionSheet atIndex:0]; + [ActionSheetTestHelpers getCellFromActionSheet:self.actionSheet atIndex:0]; XCTAssertEqualObjects(cell.actionImageView.tintColor, fakeColor); } @@ -274,7 +274,7 @@ self.actionSheet.actionTintColor = fakeControllerColor; // Then - NSArray *cells = [MDCActionSheetTestHelper getCellsFromActionSheet:self.actionSheet]; + NSArray *cells = [ActionSheetTestHelpers getCellsFromActionSheet:self.actionSheet]; for (NSUInteger index = 0; index < cells.count; ++index) { MDCActionSheetItemTableViewCell *cell = cells[index]; if (index == 1) { @@ -300,7 +300,7 @@ // Then MDCActionSheetItemTableViewCell *cell = - [MDCActionSheetTestHelper getCellFromActionSheet:self.actionSheet atIndex:0]; + [ActionSheetTestHelpers getCellFromActionSheet:self.actionSheet atIndex:0]; XCTAssertEqualObjects(cell.actionImageView.tintColor, fakeColor); } @@ -316,7 +316,7 @@ // Then MDCActionSheetItemTableViewCell *cell = - [MDCActionSheetTestHelper getCellFromActionSheet:self.actionSheet atIndex:0]; + [ActionSheetTestHelpers getCellFromActionSheet:self.actionSheet atIndex:0]; XCTAssertEqualObjects(cell.dividerColor, UIColor.blueColor); } @@ -332,7 +332,7 @@ // Then MDCActionSheetItemTableViewCell *cell = - [MDCActionSheetTestHelper getCellFromActionSheet:self.actionSheet atIndex:0]; + [ActionSheetTestHelpers getCellFromActionSheet:self.actionSheet atIndex:0]; XCTAssertTrue(cell.showsDivider); } @@ -365,7 +365,7 @@ // Then MDCActionSheetItemTableViewCell *cell = - [MDCActionSheetTestHelper getCellFromActionSheet:self.actionSheet atIndex:0]; + [ActionSheetTestHelpers getCellFromActionSheet:self.actionSheet atIndex:0]; XCTAssertEqual(cell.contentView.interactions.count, 1); XCTAssertTrue( [cell.contentView.interactions.firstObject isKindOfClass:[UIPointerInteraction class]]);