public void Indexer_ReturnsItem() { var pipe = new HttpPipelineHandler(); var handler1 = new MockHandler() { HandlerId = 1 }; var handler2 = new MockHandler() { HandlerId = 2 }; pipe.Add(handler1); pipe.Add(handler2); Assert.AreEqual(1, ((MockHandler)pipe[0]).HandlerId); Assert.AreEqual(2, ((MockHandler)pipe[1]).HandlerId); }