Example #1
0
        public void SaveAndLoad()
        {
            scrollbar.CenterValue = 20;
            var stream          = BinaryDataExtensions.SaveToMemoryStream(scrollbar);
            var loadedScrollbar = (Scrollbar)stream.CreateFromMemoryStream();

            Assert.AreEqual(center, loadedScrollbar.DrawArea);
            Assert.AreEqual(20, loadedScrollbar.CenterValue);
            Assert.AreEqual(scrollbar.Get <Picture>().Material.DefaultColor,
                            loadedScrollbar.Get <Picture>().Material.DefaultColor);
        }