Read SIF data from file
Read the number of occurrences of a data type.
using System;
using NUnit.Framework;
namespace DNV.Sesam.SifApi.IO.Doc
{
public partial class ISifDataReaderTests
{
[Test]
public void GetCount()
{
var dirName = Guid.NewGuid().ToString();
System.IO.Directory.CreateDirectory(dirName);
using (var adapter = SesamDataFactory.CreateReader(dirName, "T1.FEM"))
{
//Assert that the model is created without error
Assert.That(adapter.CreateModel(), Is.EqualTo(0));
//Get the number of data arrays of different types and check
Assert.That(adapter.GetCount("GBEAMG"), Is.EqualTo(8));
Assert.That(adapter.GetCount("GELTH"), Is.EqualTo(1));
Assert.That(adapter.GetCount("GNODE"), Is.EqualTo(427));
}
System.IO.Directory.Delete(dirName, true);
}
}
}