public void Test_RRA() { var actualState = new CpuState(); actualState.Registers.A = 0x81; actualState.Registers.ZeroFlag = true; actualState.Registers.SubtractionFlag = true; actualState.Registers.HalfCarryFlag = true; var expectedState = new CpuState(); expectedState.Registers.A = 0x40; expectedState.Registers.CarryFlag = true; var memoryMock = new Mock <IRandomAccessMemory>(); var instruction = new RRA(); instruction.Initialize(); //act while (!instruction.IsFetchNecessary()) { instruction.ExecuteCycle(actualState, memoryMock.Object); } TestHelper.AssertCpuState(expectedState, actualState); memoryMock.Verify(m => m.WriteByte(It.IsAny <ushort>(), It.IsAny <byte>()), Times.Never); }
public void AddRecords(QueryInfo child) { if (!(gvChildren.GetDataSource <EntityCollection>() is EntityCollection entities)) { return; } entities.Merge(child.Results); txtCount.Text = entities.Entities.Count.ToString(); gvChildren.Refresh(); RRA.SortColumns(gvChildren, child.EntityInfo, gvChildren.OrganizationService); }
public RelatedRecordsControl(TabControl parent, IOrganizationService service, QueryInfo child, CRMRecordEventHandler recorddoubleclick, CRMRecordEventHandler recordselectasparent) { InitializeComponent(); gvChildren.RecordDoubleClick += recorddoubleclick; SelectAsParent = recordselectasparent; if (child.Relationship is OneToManyRelationshipMetadata rel1m) { txtCascadeAssign.Text = rel1m.CascadeConfiguration.Assign?.ToString(); txtCascadeShare.Text = rel1m.CascadeConfiguration.Share?.ToString(); txtCascadeUnshare.Text = rel1m.CascadeConfiguration.Unshare?.ToString(); txtCascadeReparent.Text = rel1m.CascadeConfiguration.Reparent?.ToString(); txtCascadeDelete.Text = rel1m.CascadeConfiguration.Delete?.ToString(); pan1Mrel.Visible = true; panMMrel.Visible = false; } if (child.Relationship is ManyToManyRelationshipMetadata relmm) { txtMMEntity1.Text = relmm.Entity1LogicalName; txtMMAttribute1.Text = relmm.Entity1IntersectAttribute; txtMMEntity2.Text = relmm.Entity2LogicalName; txtMMAttribute2.Text = relmm.Entity2IntersectAttribute; pan1Mrel.Visible = false; panMMrel.Visible = true; } txtEntity.Text = child.CollectionDisplayName; txtRelation.Text = child.Relationship.SchemaName; txtCount.Text = child.Results.Entities.Count.ToString(); var tp = new TabPage(child.CollectionDisplayName + (child.Relationship is ManyToManyRelationshipMetadata ? " M:M" : "")) { Tag = child, Name = child.Relationship.SchemaName }; tp.Controls.Add(this); Dock = DockStyle.Fill; parent.TabPages.Add(tp); gvChildren.OrganizationService = service; gvChildren.DataSource = child.Results; RRA.SortColumns(gvChildren, child.EntityInfo, gvChildren.OrganizationService); }
public About(RRA rra) { InitializeComponent(); this.rra = rra; PopulateAssemblies(); }