Esempio n. 1
0
    public void CreateScript(StringWriter buffer)
    {
        buffer.WriteLine($"focus:  {InputName}");
        buffer.WriteLine($"change: {Value}");
        buffer.WriteLine("move:");

        SideEffectNode se = null;

        for (int i = 0; i < SideCount; ++i)
        {
            se = SideAt(i);
            buffer.WriteLine($"assert: {se.InputName} {se.Value}");
        }
        buffer.WriteLine("move:");
    }
Esempio n. 2
0
    /// Records a Side Effect **RELATIVE TO THE CHANGE**.
    public SideEffectNode RecordSide(SideEffectNode se)
    {
        DieIf(se == null, "Side effect can't be null.");

        SideCount++;

        if (FirstSideEffect == null)           // First side effect;
        {
            FirstSideEffect = se;
        }
        else
        {
            var node = FirstSideEffect;
            while (node.Next != null)
            {
                node = node.Next;
            }
            node.Next = se;
        }
        return(se);
    }
Esempio n. 3
0
    /// Records a Side Effect **RELATIVE TO THE MOVE**.
    public SideEffectNode RecordSide(SideEffectNode se)
    {
        DieIf(se == null, "Side effect can't be null.");
        DieIf(Change != null, "Can't have change and SE at the MOVE level.");

        SideCount++;

        if (FirstSideEffect == null)           // First side effect;
        {
            FirstSideEffect = se;
        }
        else
        {
            var node = FirstSideEffect;
            while (node.Next != null)
            {
                node = node.Next;
            }
            node.Next = se;
        }
        return(se);
    }