public void TestGetCurrentSelectedProductPrice() { _target.SetFieldOrProperty(MEMBER_VARIABLE_NAME_CURRENT_SELECTED_PRODUCT, null); Assert.AreEqual(_productsManagementTabPagePresentationModel.GetCurrentSelectedProductPrice(), ""); _target.SetFieldOrProperty(MEMBER_VARIABLE_NAME_CURRENT_SELECTED_PRODUCT, new Product(TestDefinition.DUMP_INTEGER, TestDefinition.DUMP_STRING, TestDefinition.DUMP_STRING, new Money(1998), TestDefinition.DUMP_INTEGER, TestDefinition.DUMP_STRING, TestDefinition.DUMP_STRING)); Assert.AreEqual(_productsManagementTabPagePresentationModel.GetCurrentSelectedProductPrice(), "1998"); }
/// <summary> /// Update product info view and set _isEditedProductInfo in the presentation model. /// </summary> private void UpdateProductInfoViewAndSetIsEditedProductInfo() { _productNameField.Text = _productsManagementTabPagePresentationModel.GetCurrentSelectedProductName(); _productPriceField.Text = _productsManagementTabPagePresentationModel.GetCurrentSelectedProductPrice(); _productTypeField.Text = _productsManagementTabPagePresentationModel.GetCurrentSelectedProductType(); _productImagePathField.Text = _productsManagementTabPagePresentationModel.GetCurrentSelectedProductImagePath(); _productDescriptionField.Text = _productsManagementTabPagePresentationModel.GetCurrentSelectedProductDescription(); _productsManagementTabPagePresentationModel.SetIsEditedProductInfoAndNotifyObserver(false); }