public void GetBuilderByBlockIndex_returns_existent_builders() { var graphBuilder = new BasicBlockGraphBuilder(); var first = graphBuilder.GetInitialBlockBuilder(); // Out-of-bounds indices are not tolerated Assert.That(() => graphBuilder.GetBuilderByBlockIndex(1), Throws.InstanceOf <ArgumentOutOfRangeException>()); var second = graphBuilder.GetNewBasicBlock(); Assert.That(graphBuilder.GetBuilderByBlockIndex(0), Is.SameAs(first)); Assert.That(graphBuilder.GetBuilderByBlockIndex(1), Is.SameAs(second)); }