public void Equals_EqualPaths_ShouldReturnTrue(params string[] parms) { // arrange var extraPath = new CodePath(); var sut1 = new CodePath(); foreach (var name in parms) { var mockedMethod = Mock.Create <Method>(); Mock.Arrange(() => mockedMethod.FullName).Returns(name); sut1.AddLast(mockedMethod); } var sut2 = new CodePath(); foreach (var name in parms) { var mockedMethod = Mock.Create <Method>(); Mock.Arrange(() => mockedMethod.FullName).Returns(name); sut2.AddLast(mockedMethod); } // act var actual = sut1.Equals(sut2); // assert Assert.Equal(parms.Length, sut1.Length); Assert.Equal(parms.Length, sut2.Length); Assert.True(actual); }