This is an sample Crypto market prices ap built with SwiftUI and modularization architecture. The application data is making use of the free APIs provided by Coingecko.
MIT License
33
stars
8
forks
source link
[#45] [Integrate] As a user, I can see the coinβs statistics on the Detail screen #96
Passing data from viewModel.coinDetail to CoinStatisticsSection.
Configure Equatable function of MockCoinDetail and MockMarketData.
Add new initializers for MockMarketData.
Insight π
We tested the correct value for coinDetail, and market cap, all time high, all time low values are coinDetail's properties, so we don't need to write tests for checking market cap, all time high, all time low.
it("gets the correct value for coinDetail") {
await expect { await myCoinViewModel.coinDetail }
.to(equal(expectedCoins))
}
What happened π
viewModel.coinDetail
toCoinStatisticsSection
.Equatable
function ofMockCoinDetail
andMockMarketData
.MockMarketData
.Insight π
coinDetail
, and market cap, all time high, all time low values are coinDetail's properties, so we don't need to write tests for checking market cap, all time high, all time low.Proof Of Work πΉ
https://user-images.githubusercontent.com/25881847/211710974-0ef8d62b-4fd7-40b9-bcb3-4ac93284b622.mp4