public void RegisterPropertyProxyTest() { PropertyProxy proxy = new PropertyProxy(() => card.CardId.ToString(), (value) => card.CardId = long.Parse(value), nameof(Card.CardId), card); TestChangeValidator changeValidator = new TestChangeValidator(); TestViewModel viewModel = new TestViewModel(navigationManagerMock, apiConnectorMock, changeValidator); viewModel.CallRegisterPropertyProxy(proxy); string result = proxy.Validator.Invoke("12", card); Assert.AreEqual("test", result); Assert.AreEqual(nameof(CardField.CardId), changeValidator.PropertyName); Assert.AreEqual("12", changeValidator.NewValue); Assert.AreSame(card, changeValidator.Entity); }