public void TheStateOfAValueReferenceContainingAStringCanBeRecursivelySaved()
        {
            var reference = new ValueReferenceDefinitionBuilder().WithStartingValue(new Dictionary <string, ValueReferenceDefinition>()
            {
                { "string", "aString" },
                { "number", new BigDouble(100) },
                { "bool", true },
                { "map", new Dictionary <string, ValueReferenceDefinition>()
                  {
                      { "nestedString", "string" },
                      { "nestedNumber", new BigDouble(10) },
                      { "nestedBool", true }
                  } }
            }).Build().CreateValueReference(engine);
            var serialized = reference.GetSnapshot();

            Assert.AreEqual(new Dictionary <string, ValueReference.Snapshot>()
            {
                { "string", new ValueReference.Snapshot("1", "aString") },
                { "number", new ValueReference.Snapshot("2", new BigDouble(100)) },
                { "bool", new ValueReference.Snapshot("3", true) },
                {
                    "map", new ValueReference.Snapshot("7", new Dictionary <string, ValueReference.Snapshot>()
                    {
                        { "nestedString", new ValueReference.Snapshot("4", "string") },
                        { "nestedNumber", new ValueReference.Snapshot("5", new BigDouble(10)) },
                        { "nestedBool", new ValueReference.Snapshot("6", true) }
                    })
                }
            }, serialized.value);
            Assert.AreEqual(serialized.internalId, reference.Id);
        }
        public void TheStateOfAValueReferenceContainingADictionaryCanBeSaved()
        {
            var reference  = new ValueReferenceDefinitionBuilder().WithStartingValue(new Dictionary <string, ValueReferenceDefinition>()).Build().CreateValueReference(engine);
            var serialized = reference.GetSnapshot();

            Assert.AreEqual(serialized, new ValueReference.Snapshot("1", new Dictionary <string, ValueReference.Snapshot>()));
        }
        public void TheStateOfAValueReferenceContainingANumerCanBeSaved()
        {
            var reference  = new ValueReferenceDefinitionBuilder().WithStartingValue(new BigDouble(100)).Build().CreateValueReference(engine);
            var serialized = reference.GetSnapshot();

            Assert.AreEqual(new ValueReference.Snapshot("1", new BigDouble(100)), serialized);
        }
        public void TheStateOfAValueReferenceContainingAStringCanBeSaved()
        {
            var reference  = new ValueReferenceDefinitionBuilder().WithStartingValue("astring").Build().CreateValueReference(engine);
            var serialized = reference.GetSnapshot();

            Assert.AreEqual(serialized.value, "astring");
            Assert.AreEqual(serialized.internalId, reference.Id);
        }