예제 #1
0
        public void Deserialize_NodeStyle_RefNodeLabel()
        {
            MetaModel.MetaModel model = new MetaModel.MetaModel();
            var sut        = new MetaModelYamlSerializer();
            var textReader = new StreamReader(@"Resources\Settings.Yaml");

            sut.Deserialize(model, textReader);
            textReader.Close();

            Assert.AreEqual("This is label", model.NodeStyles[1].RefNode.Label);
        }
예제 #2
0
        public void Deserialize_DefaultFile_RecentFilesEmpty()
        {
            MetaModel.MetaModel model = new MetaModel.MetaModel();
            var sut        = new MetaModelYamlSerializer();
            var textReader = new StreamReader(@"Resources\DefaultSettings.Yaml");

            sut.Deserialize(model, textReader);
            textReader.Close();

            Assert.AreEqual(0, model.RecentFiles.Count);
        }
예제 #3
0
        public void Deserialize_NodeStyle_Title()
        {
            MetaModel.MetaModel model = new MetaModel.MetaModel();
            var sut        = new MetaModelYamlSerializer();
            var textReader = new StreamReader(@"Resources\Settings.Yaml");

            sut.Deserialize(model, textReader);
            textReader.Close();

            Assert.AreEqual("Good Style", model.NodeStyles[0].Title);
        }
예제 #4
0
        public void Deserialize_DefaultFile_CheckIconsCount()
        {
            MetaModel.MetaModel model = new MetaModel.MetaModel();
            var sut        = new MetaModelYamlSerializer();
            var textReader = new StreamReader(@"Resources\DefaultSettings.Yaml");

            sut.Deserialize(model, textReader);
            textReader.Close();

            Assert.AreEqual(71, model.IconsList.Count);
        }
예제 #5
0
        public void Deserialize_NodeStyle_ImageNull()
        {
            MetaModel.MetaModel model = MetaModelHelper.Create();
            var sut        = new MetaModelYamlSerializer();
            var textReader = new StreamReader(@"Resources\Settings.Yaml");

            sut.Deserialize(model, textReader);
            textReader.Close();

            Assert.IsNull(model.NodeStyles[0].Image);
            Assert.IsNull(model.NodeStyles[1].Image);
        }