コード例 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void readRelationshipGroupCommandWithFixedReferenceFormat302() throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ReadRelationshipGroupCommandWithFixedReferenceFormat302()
        {
            // Given
            InMemoryClosableChannel channel = new InMemoryClosableChannel();
            RelationshipGroupRecord before  = new RelationshipGroupRecord(42, 3);

            before.UseFixedReferences = true;
            RelationshipGroupRecord after = new RelationshipGroupRecord(42, 3, 4, 5, 6, 7, 8, true);

            after.UseFixedReferences = true;

            (new Command.RelationshipGroupCommand(before, after)).Serialize(channel);

            // When
            PhysicalLogCommandReaderV3_0_2 reader = new PhysicalLogCommandReaderV3_0_2();
            Command command = reader.Read(channel);

            assertTrue(command is Command.RelationshipGroupCommand);

            Command.RelationshipGroupCommand relationshipGroupCommand = (Command.RelationshipGroupCommand)command;

            // Then
            assertEquals(before, relationshipGroupCommand.Before);
            assertEquals(after, relationshipGroupCommand.After);
            assertTrue(relationshipGroupCommand.Before.UseFixedReferences);
            assertTrue(relationshipGroupCommand.After.UseFixedReferences);
        }
コード例 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void readRelationshipGroupCommandWithNonRequiredSecondaryUnit() throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ReadRelationshipGroupCommandWithNonRequiredSecondaryUnit()
        {
            // Given
            InMemoryClosableChannel channel = new InMemoryClosableChannel();
            RelationshipGroupRecord before  = new RelationshipGroupRecord(42, 3);
            RelationshipGroupRecord after   = new RelationshipGroupRecord(42, 3, 4, 5, 6, 7, 8, true);

            after.RequiresSecondaryUnit = false;
            after.SecondaryUnitId       = 17;
            after.SetCreated();

            (new Command.RelationshipGroupCommand(before, after)).Serialize(channel);

            // When
            PhysicalLogCommandReaderV3_0 reader = new PhysicalLogCommandReaderV3_0();
            Command command = reader.Read(channel);

            assertTrue(command is Command.RelationshipGroupCommand);

            Command.RelationshipGroupCommand relationshipGroupCommand = (Command.RelationshipGroupCommand)command;

            // Then
            assertEquals(before, relationshipGroupCommand.Before);
            assertEquals(after, relationshipGroupCommand.After);
            VerifySecondaryUnit(after, relationshipGroupCommand.After);
        }
コード例 #3
0
 public override bool VisitRelationshipGroupCommand(Command.RelationshipGroupCommand command)
 {
     UpdateStore(_neoStores.RelationshipGroupStore, command);
     return(false);
 }