Ejemplo n.º 1
0
        public async Task SaveEnumProperty()
        {
            var db = new EnumPropertyDatabase();

            db.EnumProperty = TestEnum.Value2;
            await db.WaitForIdle();

            var value = File.ReadAllText(((ISexyDatabase)db).Node.PropertyNodes.Values.Cast <DbValuePropertyNode>().Single().File.FullName);

            Assert.AreEqual(db.EnumProperty.ToString(), value);
        }
Ejemplo n.º 2
0
        public async Task LoadEnumProperty()
        {
            var db = new EnumPropertyDatabase();

            db.EnumProperty = TestEnum.Value2;
            await db.WaitForIdle();

            var file = ((ISexyDatabase)db).Node.PropertyNodes.Values.Cast <DbValuePropertyNode>().Single().File;
            await db.EditFile(file, TestEnum.Value1.ToString());

            Assert.AreEqual(TestEnum.Value1, db.EnumProperty);
        }