Esempio n. 1
0
		public void SetValueOfPrivateProperty()
		{
			var transaction = new Transaction();
			var expectedClientId = this.fixture.Create<string>();

			#region SOLUTION (commented)
			//var clientIdProperty = transaction.GetType().GetProperty("ClientId", BindingFlags.NonPublic | BindingFlags.Instance);
			//clientIdProperty.SetValue(transaction, expectedClientId);
			#endregion

			transaction.GetClientId().Should().Be(expectedClientId);
		}