Example #1
0
        public void AddColumnSameType()
        {
            AmplaRecord record = new AmplaRecord(100);

            record.AddColumn("Location", typeof(string));
            record.AddColumn("Location", typeof(string));

            Assert.That(record.GetFieldNames().Length, Is.EqualTo(1));
            Assert.That(record.GetFieldNames()[0], Is.EqualTo("Location"));

            Assert.That(record.GetValue("Location"), Is.Null);
        }
Example #2
0
        public void GetFieldNames_NoFields()
        {
            AmplaRecord record = new AmplaRecord(100);

            Assert.That(record.GetFieldNames(), Is.Not.Empty);

            Assert.That(record.GetValue("Location"), Is.Null);

            Assert.That(record.Location, Is.Null);

            record.SetValue("Location", "Plant.Area.Point");
            Assert.That(record.Location, Is.EqualTo("Plant.Area.Point"));
        }