Hi All,
I wrote a very simple mocking framework for Pipeline Pilot .NET components so that I can unit test on my desktop very very quickly (MockContext, MockDataRecord, MockNode,...). I haven't implemented all the methods/properties and before I go too crazy I wondered if anyone out there knew of something Accelrys has that is complete? Seems like something they would have but I haven't seen any references.
Thanks!
--Jonathan
[TestMethod]
public void SimpleSourceExampleTest()
{
var context = new MockContext();
var componentParams = context.GetComponentParameters();
componentParams.Define("Some Field", "Some Value");
//component that counts to 10
var component = new SimpleSourceExample();
var status = component.OnInitialize(context);
var record = new MockDataRecord();
int i = 0;
while (status == State.ReadyForNewData)
{
status = component.OnProcess(context, record);
var value = record.GetProperties().GetByName("A Value");
var intValue = value.GetValue().GetInteger();
i++;
}
Assert.IsTrue(i==10,"I should be 10!!!");
}