public void GetPrimaryEntity_No_Primary_Id_Test()
        {
            // Setup
            TestPluginExecutionContext context = new TestPluginExecutionContext();

            // Act
            var actualEntityRef = context.GetPrimaryEntity();

            // Assert
            Assert.IsNull(actualEntityRef);
        }
        public void GetPrimaryEntityTest()
        {
            // Setup
            var expectedEntityRef = new EntityReference()
            {
                Id          = Guid.NewGuid(),
                LogicalName = "account"
            };

            TestPluginExecutionContext context = new TestPluginExecutionContext();

            context.PrimaryEntityId   = expectedEntityRef.Id;
            context.PrimaryEntityName = expectedEntityRef.LogicalName;

            // Act
            var actualEntityRef = context.GetPrimaryEntity();

            // Assert
            Assert.AreEqual(expectedEntityRef.Id, actualEntityRef.Id);
            Assert.AreEqual(expectedEntityRef.LogicalName, actualEntityRef.LogicalName);
        }