예제 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldNotReportAnythingForEqualStates()
        public virtual void ShouldNotReportAnythingForEqualStates()
        {
            // given
            CountsRecordState oracle = new CountsRecordState();
            CountsRecordState victim = new CountsRecordState();

            oracle.IncrementNodeCount(17, 5);
            victim.IncrementNodeCount(17, 5);
            oracle.IncrementNodeCount(12, 9);
            victim.IncrementNodeCount(12, 9);
            oracle.IncrementRelationshipCount(1, 4, 3, 25);
            victim.IncrementRelationshipCount(1, 4, 3, 25);

            // when
            IList <CountsRecordState.Difference> differences = oracle.Verify(victim);

            // then
            assertTrue(differences.ToString(), differences.Count == 0);
        }
예제 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldReportDifferencesBetweenDifferentStates()
        public virtual void ShouldReportDifferencesBetweenDifferentStates()
        {
            // given
            CountsRecordState oracle = new CountsRecordState();
            CountsRecordState victim = new CountsRecordState();

            oracle.IncrementNodeCount(17, 5);
            victim.IncrementNodeCount(17, 3);
            oracle.IncrementNodeCount(12, 9);
            victim.IncrementNodeCount(12, 9);
            oracle.IncrementRelationshipCount(1, 2, 3, 19);
            victim.IncrementRelationshipCount(1, 2, 3, 22);
            oracle.IncrementRelationshipCount(1, 4, 3, 25);
            victim.IncrementRelationshipCount(1, 4, 3, 25);

            // when
            ISet <CountsRecordState.Difference> differences = Iterables.asSet(oracle.Verify(victim));

            // then
            assertEquals(differences, asSet(new CountsRecordState.Difference(nodeKey(17), 0, 5, 0, 3), new CountsRecordState.Difference(relationshipKey(1, 2, 3), 0, 19, 0, 22)
                                            ));
        }