public void LocalVariableData_OnInstantia_ShouldCreateLocalStringsAndLocalDoubles() { LocalVariableData data = new LocalVariableData(); Assert.IsNotNull(data.LocalStrings); Assert.IsNotNull(data.LocalDoubles); }
public override void ReadXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; if (ele.TryPathTo("Data", false, out subEle)) { if (Data == null) { Data = new LocalVariableData(); } Data.ReadXML(subEle, master); } if (ele.TryPathTo("Name", false, out subEle)) { if (Name == null) { Name = new SimpleSubrecord <String>(); } Name.ReadXML(subEle, master); } }
public void SerializerConfig_LocalVariableData_ShouldBeEqual() { LocalVariableData data = new LocalVariableData(); data.LocalStrings.Add(new LocalStringData("stringkey1", "stringval1")); data.LocalStrings.Add(new LocalStringData("stringkey2", "stringval2")); data.LocalStrings.Add(new LocalStringData("stringkey3", "stringval3")); data.LocalDoubles.Add(new LocalDoubleData("floatkey1", 1.23f)); data.LocalDoubles.Add(new LocalDoubleData("floatkey1", 34.3f)); data.LocalDoubles.Add(new LocalDoubleData("floatkey1", 55.24235f)); LocalVariableData result; using (MemoryStream stream = new MemoryStream()) { Serializer.Serialize(stream, data); stream.Position = 0; result = Serializer.Deserialize <LocalVariableData>(stream); } Assert.IsTrue(_compareLogic.Compare(data, result).AreEqual); }
public LocalVariable(LocalVariableData Data, SimpleSubrecord <String> Name) { this.Data = Data; this.Name = Name; }
public LocalVariable() { Data = new LocalVariableData(); }
public void LocalVariableData_OnInstantiate_ShouldCreateGlobalID() { LocalVariableData data = new LocalVariableData(); Assert.IsTrue(!string.IsNullOrWhiteSpace(data.GlobalID)); }