public void ApplicationModel_with_more_than_one_aspect_Can_Be_Saved()
        {
            var dictionary1 = new Dictionary(new DictionaryXmlReader().ReadFromString("<Application><BOModel><Class Name=\"MyClass\" Caption=\"Default\"></Class><Class Name=\"MyClass2\" Caption=\"Default2\"></Class></BOModel></Application>"), Schema.GetCommonSchema());
            var dictionary = dictionary1.Clone();
            var elDict = new Dictionary(new DictionaryXmlReader().ReadFromString("<Application><BOModel><Class Name=\"MyClass\" Caption=\"elDefault\" AttributeWithOnlyAspect=\"elsomething\"></Class><Class Name=\"MyClass2\" Caption=\"Default2\"></Class></BOModel></Application>"), Schema.GetCommonSchema());
            dictionary.AddAspect("el", elDict.RootNode);
            var deDict = new Dictionary(new DictionaryXmlReader().ReadFromString("<Application><BOModel><Class Name=\"MyClass\" Caption=\"deDefault\" DeAttributeWithOnlyAspect=\"desomething\"></Class><Class Name=\"MyClass2\" Caption=\"Default2\"></Class></BOModel></Application>"), Schema.GetCommonSchema());
            dictionary.AddAspect("de", deDict.RootNode);
            var application = Isolate.Fake.Instance<DifferenceObject>(Members.CallOriginal, ConstructorWillBe.Called, Session.DefaultSession);
            application.Model=dictionary;
            application.Save();

            application.Reload();

            var dictionaryXmlWriter = new DictionaryXmlWriter();
            Assert.AreEqual(dictionary1.RootNode.ToXml(), new DictionaryXmlReader().ReadFromString(dictionaryXmlWriter.GetAspectXML(DictionaryAttribute.DefaultLanguage, application.Model.RootNode)).ToXml());
            Assert.AreEqual(elDict.RootNode.ToXml(), new DictionaryXmlReader().ReadFromString(dictionaryXmlWriter.GetAspectXML("el", application.Model.RootNode)).ToXml());
        }
        public void Application_Model_With_More_Than_one_Aspect_And_Spaces_Between_Attribute_Values_Can_Be_Saved(){
            const string defaultS = "ProtectedContentText=\"Protected Content\" PreferredLanguage=\"el\" VersionFormat=\"Version {0}.{1}.{2}\" Title=\"Solution1\" Logo=\"ExpressAppLogo\" Company=\"Endligh\" WebSite=\"1\" CanClose=\"True\" ";
            var dictionary1 = new Dictionary(new DictionaryXmlReader().ReadFromString("<Application "+defaultS + "><BOModel><Class Name=\"MyClass2\" Caption=\"Default\"></Class></BOModel></Application>"), Schema.GetCommonSchema());
            Dictionary dictionary = dictionary1.Clone();
            dictionary1.AddAspect("el", new DictionaryXmlReader().ReadFromString("<Application Company=\"Greek\"></Application>"));
            var application = Isolate.Fake.Instance<DifferenceObject>(Members.CallOriginal, ConstructorWillBe.Called, Session.DefaultSession);
            application.Model=dictionary1;
            application.Save();

            application.Reload();


            var dictionaryXmlWriter = new DictionaryXmlWriter();
            Assert.AreEqual(dictionary.RootNode.ToXml(), new DictionaryXmlReader().ReadFromString(dictionaryXmlWriter.GetAspectXML(DictionaryAttribute.DefaultLanguage, application.Model.RootNode)).ToXml());
        }