NewRecord() public method

Creates a new record with a label.
public NewRecord ( ) : RecordsetRecord
return RecordsetRecord
 public void NewRecordExpectedAddANewRecordToRecordset()
 {
     var rs = new Recordset { Name = "MyRec" };
     rs.Records.Add(rs.NewRecord());
     Assert.AreEqual(1, rs.Records.Count);
     Assert.AreEqual("MyRec(1)", rs.Records[0].Label);
 }
 public void SetValueExpectedAddANewRecordToRecordset()
 {
     var rs = new Recordset { Name = "MyRec" };
     rs.Records.Add(rs.NewRecord());
     rs.Fields.Add(new RecordsetField { Name = "MyField", Alias = "MyField" });
     rs.SetValue(0, 0, "MyTestData");
     Assert.AreEqual("MyTestData", rs.Records[0][0].Value);
 }
 public void SetValueSecondMethodExpectedAddANewRecordToRecordset()
 {
     var rs = new Recordset { Name = "MyRec" };
     var rsr = rs.NewRecord();
     rs.Records.Add(rsr);
     rs.Fields.Add(new RecordsetField { Name = "MyField", Alias = "MyField" });
     rs.Fields.Add(new RecordsetField { Name = "MyField2", Alias = "MyField2" });
     rs.SetValue(ref rsr, 0, "MyTestData");
     Assert.AreEqual("MyTestData", rs.Records[0][0].Value);
     rs.SetValue(ref rsr, 1, "MyTestData1");
     rs.SetValue(ref rsr, 0, "MyTestData3");
     Assert.AreEqual("MyTestData1", rs.Records[0][1].Value);
     Assert.AreEqual("MyTestData3", rs.Records[0][0].Value);
 }