Inheritance Hierarchy
DeltaEngine.Platforms TestWithMocksOrVisually
DeltaEngine.Scenes.Tests.Controls RadioButtonTests
Namespace: DeltaEngine.Scenes.Tests.Controls
Assembly: DeltaEngine.Scenes.Tests (in DeltaEngine.Scenes.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The RadioButtonTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
RadioButtonTests | Initializes a new instance of the RadioButtonTests class |
Methods
Name | Description | |
---|---|---|
AdvanceTimeAndUpdateEntities | (Inherited from TestWithMocksOrVisually.) | |
DefaultsToEnabled | ||
InitializeResolver | (Inherited from TestWithMocksOrVisually.) | |
RegisterMock T | (Inherited from TestWithMocksOrVisually.) | |
RenderRadioButton | ||
RenderRadioButtonAttachedToMouse | ||
RenderThreeRadioButtonsWithTheMiddleDisabled | ||
Resolve T | (Inherited from TestWithMocksOrVisually.) | |
RunAfterFirstFrame | (Inherited from TestWithMocksOrVisually.) | |
RunTestAndDisposeResolverWhenDone | (Inherited from TestWithMocksOrVisually.) | |
SaveAndLoad | ||
SetUp |
Properties
Name | Description | |
---|---|---|
IsMockResolver | (Inherited from TestWithMocksOrVisually.) |
Examples
[Test, ApproveFirstFrameScreenshot] public void RenderThreeRadioButtonsWithTheMiddleDisabled() { new RadioButton(Top, "Hello"); new RadioButton(Bottom, "Hey"); centerButton.IsEnabled = false; AdvanceTimeAndUpdateEntities(); Assert.AreEqual(Color.DarkGray, centerButton.Color); }
[Test, CloseAfterFirstFrame] public void DefaultsToEnabled() { Assert.IsTrue(centerButton.IsEnabled); Assert.AreEqual(Color.Gray, centerButton.Color); }
[Test] public void RenderRadioButtonAttachedToMouse() { new Command( point => centerButton.DrawArea = Rectangle.FromCenter(point, centerButton.DrawArea.Size)). Add(new MouseMovementTrigger()); }
[Test] public void SaveAndLoad() { centerButton.Text = "Original"; var stream = BinaryDataExtensions.SaveToMemoryStream(centerButton); var loadedButton = (RadioButton)stream.CreateFromMemoryStream(); loadedButton.Text = "Loaded"; Assert.AreEqual(Center, loadedButton.DrawArea); loadedButton.DrawArea = loadedButton.DrawArea.Move(new Vector2D(0.0f, 0.1f)); }
See Also