Beispiel #1
0
        public void GetHashCode_EmptySets_ShouldBeEqual()
        {
            // arrange
            var branchesA  = new List <EBranch>();
            var branchesB  = new List <EBranch>();
            var branchSetA = new BranchSet(branchesA);
            var branchSetB = new BranchSet(branchesB);

            // act
            var setsAreEqual = branchSetA.GetHashCode() == branchSetB.GetHashCode();

            // assert
            setsAreEqual.Should().BeTrue();
        }
Beispiel #2
0
        public void GetHashCode_DifferentBranchOrder_ShouldBeEqual()
        {
            // arrange
            var branchesA = new List <EBranch> {
                EBranch.Army, EBranch.Aviation
            };
            var branchesB = new List <EBranch> {
                EBranch.Aviation, EBranch.Army
            };
            var branchSetA = new BranchSet(branchesA);
            var branchSetB = new BranchSet(branchesB);

            // act
            var setsAreEqual = branchSetA.GetHashCode() == branchSetB.GetHashCode();

            // assert
            setsAreEqual.Should().BeTrue();
        }