public void AddColumn() { AmplaRecord record = new AmplaRecord(100); record.AddColumn("Field", typeof(int)); Assert.That(record.GetValue("Field"), Is.Null); }
public ModelVersions(AmplaRecord amplaRecord) { Id = amplaRecord.Id; Location = amplaRecord.Location; Module = amplaRecord.Module; Versions = new List <ModelVersion>(); }
public void AddColumnDifferentType() { AmplaRecord record = new AmplaRecord(100); record.AddColumn("Field", typeof(string)); Assert.Throws <ArgumentException>(() => record.AddColumn("Field", typeof(int))); }
public void GetValue_Location() { AmplaRecord record = new AmplaRecord(100) { Location = "Plant.Area.Point" }; Assert.That(record.GetValue("Location"), Is.EqualTo("Plant.Area.Point")); }
public void Id() { AmplaRecord record = new AmplaRecord(100); Assert.That(record.Id, Is.EqualTo(100)); record.Id = 200; Assert.That(record.Id, Is.EqualTo(200)); }
public void LocationGetValueRetrievesLocationField() { AmplaRecord record = new AmplaRecord(100) { Location = "Plant.Area.Point" }; Assert.That(record.GetValue("Location"), Is.EqualTo("Plant.Area.Point")); Assert.That(record.Location, Is.EqualTo("Plant.Area.Point")); }
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); }
public void LocationPropertyIsSetViaSetValue() { AmplaRecord record = new AmplaRecord(100); Assert.That(record.Location, Is.Null); record.AddColumn("Location", typeof(string)); Assert.That(record.Location, Is.Null); record.SetValue("Location", "Plant.Area.Point"); Assert.That(record.Location, Is.EqualTo("Plant.Area.Point")); }
public void Location() { AmplaRecord record = new AmplaRecord(100); Assert.That(record.Location, Is.Null); record.Location = "Plant.Area.Point"; Assert.That(record.Location, Is.EqualTo("Plant.Area.Point")); record.SetValue("Location", "Plant.Area.Equipment.Point"); }
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")); }