public void OutputSidePacketIndex_ShouldReturnNegativeValue_When_NotInitialized() { using (var config = new ValidatedGraphConfig()) { Assert.AreEqual(-1, config.OutputSidePacketIndex("")); } }
public void OutputSidePacketIndex_ShouldReturnIndex_When_TheNameIsValid() { using (var config = new ValidatedGraphConfig()) { config.Initialize(CalculatorGraphConfig.Parser.ParseFromTextFormat(_ConstantSidePacketConfigText)).AssertOk(); Assert.AreEqual(0, config.OutputSidePacketIndex("int_packet")); } }
public void OutputSidePacketIndex_ShouldReturnNegativeValue_When_TheNameIsInvalid() { using (var config = new ValidatedGraphConfig()) { config.Initialize(CalculatorGraphConfig.Parser.ParseFromTextFormat(_ConstantSidePacketConfigText)).AssertOk(); Assert.AreEqual(-1, config.OutputSidePacketIndex("unknown")); } }