Пример #1
0
        public void UpdateVectorPriceInvalidArgument()
        {
            // Create an empty array
            MamaPrice[] emptyArray = new MamaPrice[0];

            // Call the function with an invalid array
            m_msg.updateVectorPrice(null, 1, emptyArray);
        }
Пример #2
0
            private void paddedPrintPrice(MamaPrice price, int padLen, bool padAfter)
            {
                String precisionStr = "F2";

                if (myPrecision >= 1 && myPrecision <= 6)
                {
                    precisionStr = "F" + myPrecision;
                }

                double val = price.getValue();

                paddedPrint(val.ToString(precisionStr), padLen, padAfter);
            }
Пример #3
0
        private MamaPrice[] InitialisePriceArray(int numberPrices, int offset)
        {
            // Create the array of messages
            MamaPrice[] ret = new MamaPrice[numberPrices];
            for (int nextPrice = 0; nextPrice < numberPrices; nextPrice++)
            {
                // Allocate the price
                ret[nextPrice] = new MamaPrice();

                // Add a field
                ret[nextPrice].setValue((nextPrice + offset));
            }

            return(ret);
        }
Пример #4
0
            private void paddedPrintPrice(MamaPrice price, int padLen, bool padAfter)
            {
                String precisionStr = "F2";

                if (myPrecision >= 1 && myPrecision <=6)
                {
                    precisionStr = "F" + myPrecision;
                }

                double val = price.getValue();
                paddedPrint(val.ToString(precisionStr), padLen, padAfter);
            }