示例#1
0
        internal void FromString(DoubleArrayConverters sut, IFixture fixture)
        {
            // arrange
            var expected     = fixture.Create <double>();
            var doubleString = expected.ToString("r", CultureInfo.InvariantCulture);
            // act
            var actual = sut.Convert(doubleString, CultureInfo.InvariantCulture);

            // assert
            Assert.Equal((IEnumerable <double>)ImmutableArray.Create(expected), actual);
        }
示例#2
0
        internal void FromStringArray(DoubleArrayConverters sut, IFixture fixture)
        {
            // arrange
            var expected      = fixture.CreateMany <double>().ToArray();
            var doublesString = expected.Select(s => s.ToString("r", CultureInfo.InvariantCulture)).ToImmutableArray();
            // act
            var actual = sut.Convert(doublesString, CultureInfo.InvariantCulture);

            // assert
            Assert.Equal(expected, actual);
        }
示例#3
0
 internal void FromBool(DoubleArrayConverters sut)
 {
     Assert.Throws <NotSupportedException>(() => sut.Convert(true, CultureInfo.InvariantCulture));
 }