Learning Playground

Welcome to the learning playground a space to try interactive concepts related to Power Fx and testing. You can use the steps of each playground task to explore different key concepts.

Once have completed each set of learning playground concepts have a look at related learning playground tasks to build your knowledge.

Assert() Function with Simulated Connector

Learn how to use the Assert() function with a simulated connector in your test.

Results

Playground Steps

You can try the following to experiment with this playground task:

  • Press "Try It!" to verify that the test run and returns a value of true that the simulated values are found
  • Reset the test and only place WeatherService.GetCurrentWeather("Seattle, WA") to see the orginal value
  • Change the value of the city name to see that the results change. For example WeatherService.GetCurrentWeather("Paris")
  • Reset the test and use the following to see that Other and Cold are returned:

    Preview.SimulateConnector({Name:"WeatherService", Then: {Location: "Other", Condition: "Cold"}}); WeatherService.GetCurrentWeather("Seattle, WA")

  • Try Learn Module: Simulated Connector