paint-brush
Swift XCTest: setUp and tearDown Are Not Dead Yetby@andreota
3,641 reads
3,641 reads

Swift XCTest: setUp and tearDown Are Not Dead Yet

by André Ota4mDecember 2nd, 2021
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Apple instructs us to do our unit tests using the XCTest framework. We are making use of two very important methods: setUp and tear down. For each test, Xcode will create a new instance of our test class. This means we do not have to use the setUp method and then our **sut** will be created and we won't have problems accessing it. Since we are done using it, there is no problem on removing it from our memory. So when we are going to run **test1** or **test2**, an instance of **PlayerListManagerTests will be create.

People Mentioned

Mention Thumbnail

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Swift XCTest: setUp and tearDown Are Not Dead Yet
André Ota HackerNoon profile picture
André Ota

André Ota

@andreota

iOS Developer. Coding is the best part of the job.

About @andreota
LEARN MORE ABOUT @ANDREOTA'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

André Ota HackerNoon profile picture
André Ota@andreota
iOS Developer. Coding is the best part of the job.

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite