Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
lawrence_shaun_introducing_net_maui_build_and_deploy_crosspl.pdf
Скачиваний:
50
Добавлен:
26.06.2023
Размер:
5.15 Mб
Скачать

Chapter 11

Getting Specific

•\

Cover what unit testing is and how you can apply it to a

 

.NET MAUI application.

•\

Learn what snapshot testing is and how you can

 

implement it.

•\

Gain an understanding of device tests and how you can

 

apply them to your applications.

•\

Look to the future for yet more testing goodness.

Source Code

The resulting source code for this chapter can be found on the GitHub repository at https://github.com/Apress/Introducing-MAUI/tree/ main/ch11.

Extra Assignment

You have only scratched the surface on the platform integration APIs that

.NET MAUI offers you. I would love for you to look over the other possible APIs and build your own widgets that would benefit from them. The documentation for the platform integration APIs can be found at https:// learn.microsoft.com/dotnet/maui/platform-integration/.

Barometer Widget

You can make use of the Barometer API in order to report the ambient air pressure back to the user. In fact, this might be a good addition to the Weather widget rather than a whole new widget. The documentation for this API can be found at ­https://learn.microsoft.com/dotnet/maui/ platform-integration/device/sensors?#barometer.

362

Chapter 11 Getting Specific

Geocoding Lookup

I am reluctant to enable permissions like location access to apps I don’t believe really need them. Perhaps you can enhance your Weather widget to allow the user to supply their nearest city, town, or postal code and then use the Geocoding API to reverse lookup the longitude and latitude information required for the Open Weather API. The documentation

for the Geocoding API can be found at ­https://learn.microsoft.com/ dotnet/maui/platform-integration/device/geocoding.

363