public void CreateAndAddEntryFromGenInfo_DefaultGenInfo_SuccessfullyAdded() { GeneratorMappingManager genMgr = Factory_GeneratorMappingManager_Default(); GenEntryConfigInfo genConfigInfo = Factory_GenEntryConfigInfo_Default(); genMgr.CreateAndAddEntryFromGenInfo(genConfigInfo); Assert.AreEqual(1, genMgr.GetNumEntries()); }
public void CreateAndAddEntryFromGenInfo_TimeBasedGenInfo_CorrectlyInitializedInRangeType() { GeneratorMappingManager genMgr = Factory_GeneratorMappingManager_Default(); GenEntryConfigInfo genConfigInfo = Factory_GenEntryConfigInfo_Default(); genConfigInfo.PeriodType = GenPeriodType.Time; int newId = genMgr.CreateAndAddEntryFromGenInfo(genConfigInfo); IReturnStatus <IGeneratorMappingEntry> getCopyRetStatus = genMgr.GetCopyOfMappingEntryById(newId); Assert.IsTrue(getCopyRetStatus.IsValid); Assert.AreEqual(MssMsgType.RelTimePeriodPos, getCopyRetStatus.Value.InMssMsgRange.MsgType); }
public void CreateAndAddEntryFromGenInfo_DefaultGenInfo_CorrectlyInitializedInfoClassses() { GeneratorMappingManager genMgr = Factory_GeneratorMappingManager_Default(); GenEntryConfigInfo genConfigInfo = Factory_GenEntryConfigInfo_Default(); int newId = genMgr.CreateAndAddEntryFromGenInfo(genConfigInfo); IGeneratorMappingEntry genEntry = genMgr.GetCopyOfMappingEntryById(newId).Value; //GenHistoryInfo should not be initialized until the first MSS Event is generated Assert.IsFalse(genEntry.GenHistoryInfo.Initialized); Assert_GenEntryIsInitialized(genEntry); Assert.IsNotNull(genEntry.CurveShapeInfo); }
public void CreateAndAddEntryFromGenInfo_DefaultGenInfo_CorrectlyInitializedOutRange() { GeneratorMappingManager genMgr = Factory_GeneratorMappingManager_Default(); GenEntryConfigInfo genConfigInfo = Factory_GenEntryConfigInfo_Default(); int newId = genMgr.CreateAndAddEntryFromGenInfo(genConfigInfo); IReturnStatus <IGeneratorMappingEntry> getCopyRetStatus = genMgr.GetCopyOfMappingEntryById(newId); Assert.IsTrue(getCopyRetStatus.IsValid); IGeneratorMappingEntry genEntry = getCopyRetStatus.Value; Assert.AreEqual(genEntry.Id, genEntry.OutMssMsgRange.Data1RangeBottom); Assert.AreEqual(genEntry.Id, genEntry.OutMssMsgRange.Data1RangeTop); Assert.AreEqual(MssMsgUtil.UNUSED_MSS_MSG_DATA, genEntry.OutMssMsgRange.Data2RangeBottom); Assert.AreEqual(MssMsgUtil.UNUSED_MSS_MSG_DATA, genEntry.OutMssMsgRange.Data2RangeTop); Assert.AreEqual(MssMsgType.Generator, genEntry.OutMssMsgRange.MsgType); }