Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GeliBusinessPlatform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ljy
GeliBusinessPlatform
Commits
eab137d7
Commit
eab137d7
authored
Nov 25, 2020
by
刘俊宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善仓库管理列表上拉刷新的逻辑
parent
181ee164
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
0 deletions
+64
-0
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
...ata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/ViewController/仓库管理/WarehoseMangementListVC.swift
...latform/ViewController/仓库管理/WarehoseMangementListVC.swift
+2
-0
GeliBusinessPlatformTests/GeliBusinessPlatformTests.swift
GeliBusinessPlatformTests/GeliBusinessPlatformTests.swift
+62
-0
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
View file @
eab137d7
No preview for this file type
GeliBusinessPlatform/ViewController/仓库管理/WarehoseMangementListVC.swift
View file @
eab137d7
...
...
@@ -89,6 +89,8 @@ class WarehoseMangementListVC: BaseViewController, UISearchBarDelegate, UITableV
})
},
completion
:
nil
)
self
.
tableV
?
.
mj_footer
?
.
endRefreshing
()
})
{
(
error
)
in
self
.
tableV
?
.
mj_header
?
.
endRefreshing
()
}
...
...
GeliBusinessPlatformTests/GeliBusinessPlatformTests.swift
View file @
eab137d7
...
...
@@ -12,19 +12,26 @@ import XCTest
class
GeliBusinessPlatformTests
:
XCTestCase
{
override
func
setUp
()
{
// 每个类中 测试方法调用前 先调用这个方法 以方便 开发者 做些 测试前的准备
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override
func
tearDown
()
{
// 当这个 类中的 所有的 测试 方法 测试完后 会调用这个方法
// Put teardown code here. This method is called after the invocation of each test method in the class.
}
func
testExample
()
{
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
// 测试方法样例
}
func
testPerformanceExample
()
{
// 这是 我们做性能测试的方法 把要测试的方法 放进Block 就可以了
//这个方法主要是做性能测试的,所谓性能测试,主要就是评估一段代码的运行时间。该方法就是性能测试方法的样例。
// This is an example of a performance test case.
self
.
measure
{
// Put the code you want to measure the time of here.
...
...
@@ -32,3 +39,58 @@ class GeliBusinessPlatformTests: XCTestCase {
}
}
//断言
//单元测试是以代码测试代码。不是靠 NSLog 来测试,而是使用断言来测试的,提前预判条件必须满足
// // XCTAssert(expression, ...)
// // XCTAssert(条件, 不满足条件的描述)
//
// - (void)testExample {
// NSLog(@"自定义测试 testExample");
// int a = 3;
// XCTAssertTrue(a == 0, "a 不能等于 0");
// }
//无条件报错
//
//XCTFail. 生成一个无条件报错XCTFail(format...)
//
//等价测试
//
//XCTAssertEqualObjects. 当expression1不等于expression2时报错(或者一个对象为空,另一个不为空)XCTAssertEqualObjects(expression1, expression2, format...)
//
//XCTAssertNotEqualObjects. 当expression1等于expression2时报错。XCTAssertNotEqualObjects(expression1, expression2, format...)
//
//XCTAssertEqual. 当expression1不等于expression2时报错,这个测试用于C语言的标量。XCTAssertEqual(expression1, expression2, format...)
//
//XCTAssertNotEqual. 当expression1等于expression2时报错,这个测试用于C语言的标量。XCTAssertNotEqual(expression1, expression2, format...)
//
//XCTAssertEqualWithAccuracy. 当expression1和expression2之间的差别高于accuracy 将报错。这种测试适用于floats和doubles这些标量,两者之间的细微差异导致它们不完全相等,但是对所有的标量都有效。XCTAssertEqualWithAccuracy(expression1, expression2, accuracy, format...)
//
//XCTAssertNotEqualWithAccuracy. 当expression1和expression2之间的差别低于accuracy将产生失败。这种测试适用于floats和doubles这些标量,两者之间的细微差异导致它们不完全相等,但是对所有的标量都有效。XCTAssertNotEqualWithAccuracy(expression1, expression2, accuracy, format...)
//
//空测试
//
//XCTAssertNil. 当expression参数非nil时报错。XCTAssertNil(expression, format...)
//
//XCTAssertNotNil. 当expression参数为nil时报错。XCTAssertNotNil(expression, format...)
//
//XCTAssertTrue. 当expression计算结果为false时报错。XCTAssertTrue(expression, format...)
//
//XCTAssert. 当expression计算结果为false时报错,与XCTAssertTrue同义。XCTAssert(expression, format...)
//
//XCTAssertFalse. 当expression计算结果为true报错。XCTAssertFalse(expression, format...)
//
//异常测试
//
//XCTAssertThrows.当expression不抛出异常时报错。XCTAssertThrows(expression, format...)
//
//XCTAssertThrowsSpecific.当expression针对指定类不抛出异常时报错。XCTAssertThrowsSpecific(expression, exception_class, format...)
//
//XCTAssertThrowsSpecificNamed. 当expression针对特定类和特定名字不抛出异常时报错。对于AppKit框架或Foundation框架非常有用,抛出带有特定名字的NSException(NSInvalidArgumentException等等)。XCTAssertThrowsSpecificNamed(expression, exception_class, exception_name, format...)
//
//XCTAssertNoThrow. 当expression抛出异常时报错。XCTAssertNoThrow(expression, format...)
//
//XCTAssertNoThrowSpecific. 当expression针对指定类抛出异常时报错。任意其他异常都可以;也就是说它不会报错。XCTAssertNoThrowSpecific(expression, exception_class, format...)
//
//XCTAssertNoThrowSpecificNamed. 当expression针对特定类和特定名字抛出异常时报错。对于AppKit框架或Foundation框架非常有用,抛出带有特定名字的NSException(NSInvalidArgumentException等等)XCTAssertNoThrowSpecificNamed(expression, exception_class, exception_name, format...)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment