Ejemplo n.º 1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Format.Length != 0)
            {
                hash ^= Format.GetHashCode();
            }
            if (NullFormat.Length != 0)
            {
                hash ^= NullFormat.GetHashCode();
            }
            if (Halign != global::FactSet.Protobuf.Stach.Table.HorizontalAlignment.UnknownHalign)
            {
                hash ^= Halign.GetHashCode();
            }
            if (Valign != global::FactSet.Protobuf.Stach.Table.VerticalAlignment.UnknownValign)
            {
                hash ^= Valign.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Ejemplo n.º 2
0
        public void ReturnExpectedValues_WhenFormattingNullTimeAndDeterminedNullFormatsAreExpected(
            NullFormat nullFormat, string expectedConversion)
        {
            var sut = new GeneralTimeFormatter
            {
                NullFormat = nullFormat
            };

            var formattedTime = sut.Format(null);

            Assert.Equal(expectedConversion, formattedTime);
        }
Ejemplo n.º 3
0
        public void ReturnZeroWithCorrectAmountOfDecimals_WhenZeroWithAccuracyIsExpected(
            NullFormat nullFormat, TimeAccuracy accuracy, string expectedConversion)
        {
            var sut = new GeneralTimeFormatter
            {
                NullFormat = nullFormat,
                Accuracy   = accuracy
            };

            var formattedTime = sut.Format(null);

            Assert.Equal(expectedConversion, formattedTime);
        }