public void TestSerialization()
        {
            ExplicitFormula x1 = CreateObject <ExplicitFormula>().WithName("Fortunato").WithDimension(DimensionLength);

            x1.AddObjectPath(ObjectPathFactory.CreateAbsoluteFormulaUsablePath(P1));
            x1.AddObjectPath(ObjectPathFactory.CreateRelativeFormulaUsablePath(P, P0));
            x1.AddObjectPath(ObjectPathFactory.CreateRelativeFormulaUsablePath(P, P2).WithAlias("Pitter"));
            x1.ResolveObjectPathsFor(P);
            x1.FormulaString = "1.1 + 2.2";

            ExplicitFormula x2 = SerializeAndDeserialize(x1);

            x2.ResolveObjectPathsFor(P);

            AssertForSpecs.AreEqualExplicitFormula(x2, x1);
        }
        public void TestSerializationWithDependencies()
        {
            ExplicitFormula x1 = CreateObject <ExplicitFormula>().WithName("Fortunato").WithDimension(DimensionLength);

            x1.AddObjectPath(ObjectPathFactory.CreateAbsoluteFormulaUsablePath(P1));
            x1.AddObjectPath(ObjectPathFactory.CreateRelativeFormulaUsablePath(P, P0));
            x1.AddObjectPath(ObjectPathFactory.CreateRelativeFormulaUsablePath(P, P2).WithAlias("Pitter"));
            x1.ResolveObjectPathsFor(P);
            x1.FormulaString = "Paul + Peter + Pitter";

            P1.Value = 1.0;
            P0.Value = 10.0;
            P2.Value = 2.0;

            ExplicitFormula x2 = SerializeAndDeserialize(x1);

            x2.ResolveObjectPathsFor(P);

            AssertForSpecs.AreEqualExplicitFormula(x2, x1);
        }