Monday, 23 October 2017

creation of test case and running it sucessfully

Please create a new test case in class WHSPhysDimUOMScenarioTest   right click the test and click run


    /// <summary>
    /// Tests that when the isAnyPhysicalDimensionDifferentThanItemInventoryPhysicalDimension  is   called with a different
    /// Depth in inventory physical dimension unit of measure and physical dimension unit of measure,
    /// then the returned type will be true.
    /// </summary>
    [SysTestMethod]
    public void isPhysicalDimensionsDistinctThanInventoryDimension_DiffrentUOMFound_returnFalse()
    {
        WHSPhysDimUOM   WHSPhysDimUOM;
        boolean         ret = false;
       
        ttsbegin;
        // Arrange
        select forupdate item;
        item.grossDepth  = 10;
        item.grossHeight = 25;
        item.grossWidth  = 30;
        item.TaraWeight  = 10;
        item.NetWeight   = 20;
        item.doUpdate();
        WHSPhysDimUOM.UOM       = '';
        WHSPhysDimUOM.ItemId    = item.ItemId;
        WHSPhysDimUOM.Depth     = 10;
        WHSPhysDimUOM.Height    = 25;
        WHSPhysDimUOM.Width     = 30;
        WHSPhysDimUOM.Weight    = 30;
        WHSPhysDimUOM.doInsert();
        // Act
        ret = WHSPhysDimUOM.isAnyPhysicalDimensionDifferentThanItemInventoryPhysicalDimension();
        WHSPhysDimUOM.reread();
        // Assert
        this.assertEquals(ret, false, 'The item inventory physical dimension is different for the physical dimesnsion.');
        ttsabort;
    }

No comments:

Post a Comment

intercompany PO multiple product receipt by x++

public void processStampICPO(PackingSlipId _deliveryNote,                             Transdate _deliverydate,                             ...