public void TestGetProductType() { _target.SetFieldOrProperty(MEMBER_VARIABLE_NAME_PRODUCT_TYPES, new List <string> { "Type 1", "Type 2", "Type 3" }); Assert.ThrowsException <ArgumentOutOfRangeException>(() => _productTypesManager.GetProductType(-1)); Assert.ThrowsException <ArgumentOutOfRangeException>(() => _productTypesManager.GetProductType(3)); Assert.AreEqual(_productTypesManager.GetProductType(2), "Type 3"); }
/// <summary> /// Get the number of product pages of the tab page whose index is tabPageIndex. /// </summary> public int GetTabPageProductPagesCount(int tabPageIndex) { return(_productsAndProductTypesManager.GetProductTypeProductPagesCount(_productTypesManager.GetProductType(tabPageIndex))); }