public void T2_lines_can_be_found_by_name() { ICity c = CityFactory.CreateCity("Paris"); ILine l1 = c.AddLine("1"); c.FindLine("1").Should().BeSameAs(l1); c.FindLine("2").Should().BeNull(); ILine l2 = c.AddLine("2"); c.FindLine("1").Should().BeSameAs(l1); c.FindLine("2").Should().BeSameAs(l2); c.FindLine("3").Should().BeNull(); ILine l3 = c.AddLine("3"); ILine l4 = c.AddLine("4"); ILine l5 = c.AddLine("5"); c.FindLine("1").Should().BeSameAs(l1); c.FindLine("2").Should().BeSameAs(l2); c.FindLine("3").Should().BeSameAs(l3); c.FindLine("4").Should().BeSameAs(l4); c.FindLine("5").Should().BeSameAs(l5); var randomNames = Enumerable.Range(0, 20) .Select(i => String.Format("n°{0} - {1}", i, Guid.NewGuid().ToString())) .ToArray(); var lines = randomNames.Select(n => c.AddLine(n)).ToArray(); lines.Should().BeEquivalentTo(randomNames.Select(n => c.FindLine(n))); }