Click here to Skip to main content
15,884,472 members
Articles / Programming Languages / C#

Article Two: Building a UI Platform in C# - Testing via UI Animation

,
Rate me:
Please Sign up or sign in to vote.
4.20/5 (7 votes)
3 Mar 20055 min read 51.3K   927   33  
Describes an implementation of UI animation for the support of Test-Driven Development.
freeBlix.PlayerState
{
  _ColorSample = freeBlix.RectangleColorSample
  {
    _Colors = UITestingFramework.ColorCollection
    {
      _StreamedInnerList = System.Collections.ArrayList
      {
        System.Drawing.Color
        {
          value = 4293716440
          knownColor = 0
          state = 2
          name = 
        }
        System.Drawing.Color
        {
          value = 4293716440
          knownColor = 0
          state = 2
          name = 
        }
        System.Drawing.Color
        {
          value = 4293716440
          knownColor = 0
          state = 2
          name = 
        }
        System.Drawing.Color
        {
          value = 4293716440
          knownColor = 0
          state = 2
          name = 
        }
        System.Drawing.Color
        {
          value = 4293716440
          knownColor = 0
          state = 2
          name = 
        }
        System.Drawing.Color
        {
          value = 4293716440
          knownColor = 0
          state = 2
          name = 
        }
        System.Drawing.Color
        {
          value = 4293716440
          knownColor = 0
          state = 2
          name = 
        }
        System.Drawing.Color
        {
          value = 4293716440
          knownColor = 0
          state = 2
          name = 
        }
        System.Drawing.Color
        {
          value = 4293716440
          knownColor = 0
          state = 2
          name = 
        }
        System.Drawing.Color
        {
          value = 4293716440
          knownColor = 0
          state = 2
          name = 
        }
        System.Drawing.Color
        {
          value = 4293716440
          knownColor = 0
          state = 2
          name = 
        }
        System.Drawing.Color
        {
          value = 4293716440
          knownColor = 0
          state = 2
          name = 
        }
        System.Drawing.Color
        {
          value = 4293716440
          knownColor = 0
          state = 2
          name = 
        }
        System.Drawing.Color
        {
          value = 4293716440
          knownColor = 0
          state = 2
          name = 
        }
        System.Drawing.Color
        {
          value = 4293716440
          knownColor = 0
          state = 2
          name = 
        }
        System.Drawing.Color
        {
          value = 4293716440
          knownColor = 0
          state = 2
          name = 
        }
      }
    }
  }
  _States = freeBlix.PlayerStateCollection
  {
    _StreamedInnerList = System.Collections.ArrayList
    {
      freeBlix.PlayerState
      {
        _ColorSample = freeBlix.RectangleColorSample
        {
          _Colors = UITestingFramework.ColorCollection
          {
            _StreamedInnerList = System.Collections.ArrayList
            {
            }
          }
        }
        _States = freeBlix.PlayerStateCollection
        {
          _StreamedInnerList = System.Collections.ArrayList
          {
          }
        }
        _EventLog = UITestingFramework.CaseEventLog
        {
          _Entries = UITestingFramework.CaseEventLogEntryCollection
          {
            _InnerList = System.Collections.ArrayList
            {
            }
          }
        }
        _ControlType = LineIndicator
        _Left = 60
        _Top = 0
        _Right = 60
        _Bottom = 465
        _Width = 0
        _Height = 465
      }
      freeBlix.PlayerState
      {
        _ColorSample = freeBlix.RectangleColorSample
        {
          _Colors = UITestingFramework.ColorCollection
          {
            _StreamedInnerList = System.Collections.ArrayList
            {
              System.Drawing.Color
              {
                value = 4294029218
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4294029218
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4294029218
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4294029218
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4293716440
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4293716440
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4293716440
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4293716440
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4293716440
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4293716440
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4293716440
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4293716440
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4294029218
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4294029218
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4294029218
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4294029218
                knownColor = 0
                state = 2
                name = 
              }
            }
          }
        }
        _States = freeBlix.PlayerStateCollection
        {
          _StreamedInnerList = System.Collections.ArrayList
          {
          }
        }
        _EventLog = UITestingFramework.CaseEventLog
        {
          _Entries = UITestingFramework.CaseEventLogEntryCollection
          {
            _InnerList = System.Collections.ArrayList
            {
            }
          }
        }
        _ControlType = StonePad
        _Left = 310
        _Top = 310
        _Right = 412
        _Bottom = 412
        _Width = 102
        _Height = 102
      }
      freeBlix.PlayerState
      {
        _ColorSample = freeBlix.RectangleColorSample
        {
          _Colors = UITestingFramework.ColorCollection
          {
            _StreamedInnerList = System.Collections.ArrayList
            {
              System.Drawing.Color
              {
                value = 4289834978
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4289834978
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4289834978
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4289834978
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4289834978
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4289834978
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4289834978
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4289834978
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4289834978
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4289834978
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4289834978
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4289834978
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4289834978
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4289834978
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4289834978
                knownColor = 0
                state = 2
                name = 
              }
              System.Drawing.Color
              {
                value = 4289834978
                knownColor = 0
                state = 2
                name = 
              }
            }
          }
        }
        _States = freeBlix.PlayerStateCollection
        {
          _StreamedInnerList = System.Collections.ArrayList
          {
          }
        }
        _EventLog = UITestingFramework.CaseEventLog
        {
          _Entries = UITestingFramework.CaseEventLogEntryCollection
          {
            _InnerList = System.Collections.ArrayList
            {
            }
          }
        }
        _ControlType = Stone
        _Left = 10
        _Top = 245
        _Right = 110
        _Bottom = 345
        _Width = 100
        _Height = 100
      }
    }
  }
  _EventLog = UITestingFramework.CaseEventLog
  {
    _Entries = UITestingFramework.CaseEventLogEntryCollection
    {
      _InnerList = System.Collections.ArrayList
      {
        UITestingFramework.CaseEventLogEntry
        {
          _Summary = Player Started
        }
        UITestingFramework.CaseEventLogEntry
        {
          _Summary =   Mouse Move(15, 15) Completed.
        }
        UITestingFramework.CaseEventLogEntry
        {
          _Summary =   Left Mouse Down (15, 15) Completed.
        }
        UITestingFramework.CaseEventLogEntry
        {
          _Summary =   Mouse Move(250, 250) Completed.
        }
        UITestingFramework.CaseEventLogEntry
        {
          _Summary =   Left Mouse Up (250, 250) Completed.
        }
        UITestingFramework.CaseEventLogEntry
        {
          _Summary = Player Completed
        }
      }
    }
  }
  _ControlType = ControlOverlay
  _Left = 0
  _Top = 0
  _Right = 492
  _Bottom = 465
  _Width = 492
  _Height = 465
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
CEO Sagerion, LLC
United States United States
I read About Face by Alan Cooper in 1995 and immediately recognized it as a founding document for the future of software. I also recognized we had a long, long way to go - and yes, even with the advent of iOS, we are still not there yet.

At my company, Sagerion (say-jair-ee-on), we can take a look at your planned or existing software and suggest ways of making it better - lots better. We can develop down-to-the-pixel blueprints showing exactly what our suggestions mean. We can help manage on-going development to make sure the top-notch user-experience we've suggested really does get built. Now, honestly, how often have you ever seen all those things happen?

You may or may not already have great development going on - but what does that matter if you don't have great design driving it?

Feel free to contact me at tom@sagerion.com, I would love to hear about your next ground-breaking project.

Written By
Founder Sagerion LLC
United States United States
www.filoshare.com
-It is a fresh and free distributed source control system.

Comments and Discussions