Class RecordedData


  • public class RecordedData
    extends java.lang.Object
    Keeps track of the network calls and variable names that were made in a test session.
    • Constructor Summary

      Constructors 
      Constructor Description
      RecordedData()
      Creates a new instance of RecordedData to manage network calls and variables in a test session.
    • Constructor Detail

      • RecordedData

        public RecordedData()
        Creates a new instance of RecordedData to manage network calls and variables in a test session.
    • Method Detail

      • findFirstAndRemoveNetworkCall

        public NetworkCallRecord findFirstAndRemoveNetworkCall​(java.util.function.Predicate<NetworkCallRecord> isMatch)
        Finds the first matching NetworkCallRecord based on the predicate, removes it from the current network calls, and returns it. null is returned if network call could not be matched.
        Parameters:
        isMatch - Predicate to match for a given network call.
        Returns:
        The first NetworkCallRecord that matched isMatch, otherwise null if no network call could be matched.
      • addNetworkCall

        public void addNetworkCall​(NetworkCallRecord record)
        Adds a network call to the end of the list.
        Parameters:
        record - The record to add.
      • addVariable

        public void addVariable​(java.lang.String variable)
        Adds a variable to the end of the list.
        Parameters:
        variable - The variable to add to the list.
      • removeVariable

        public java.lang.String removeVariable()
        Removes the first variable from the list and returns it.
        Returns:
        The first variable.