SelectBoxTests SaveAndLoad Method Delta Engine Documentation

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

public void SaveAndLoad()
Examples

[Test, CloseAfterFirstFrame]
public void SaveAndLoad()
{
    var stream = BinaryDataExtensions.SaveToMemoryStream(selectBox);
    var loadedSelectBox = (SelectBox)stream.CreateFromMemoryStream();
    Assert.AreEqual(selectBox.DrawArea, loadedSelectBox.DrawArea);
    Assert.AreEqual(3, loadedSelectBox.Values.Count);
    Assert.AreEqual(selectBox.Values[1].ToString(), loadedSelectBox.Values[1].ToString());
}
See Also