Label PreviousText Property Delta Engine Documentation

Namespace: DeltaEngine.Scenes.Controls
Assembly: DeltaEngine.Scenes (in DeltaEngine.Scenes.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public string PreviousText { get; protected set; }

Property Value

Type: String
Remarks

Tests: DeltaEngine.Scenes.Tests.Controls.LabelTests
Examples

3 unit tests call DeltaEngine.Scenes.Controls.Label.PreviousText
[Test, CloseAfterFirstFrame]
public void InitialText()
{
    Assert.AreEqual("Hello World", label.Text);
    Assert.AreEqual("Hello World", label.PreviousText);
}
[Test, CloseAfterFirstFrame]
public void ChangeTextOnce()
{
    label.Text = "Change 1";
    Assert.AreEqual("Change 1", label.Text);
    Assert.AreEqual("Hello World", label.PreviousText);
}
[Test, CloseAfterFirstFrame]
public void ChangeTextTwice()
{
    label.Text = "Change 1";
    label.Text = "Change 2";
    Assert.AreEqual("Change 2", label.Text);
    Assert.AreEqual("Change 1", label.PreviousText);
}
See Also