Пример #1
0
        private void ToString_Parameterized(double value, string expectedResult)
        {
            // Arrange
            var doubleNode = new JsonDoubleNode(value);

            // Act
            string result = doubleNode.ToString();

            // Assert
            Assert.AreEqual(expectedResult, result);
        }
Пример #2
0
        public void ToString_DecimalValue_DefaultCulture()
        {
            // Arrange
            var node = new JsonDoubleNode(0.1234567);

            // Act
            string json = node.ToString();

            // Assert
            Assert.IsNotNull(node);
            Assert.AreEqual("0.1234567", json);
        }
Пример #3
0
        public void ToString_DecimalValue_CultureWithDifferentDecimalSeparator()
        {
            CultureTestUtility.ExecuteInCulture("fr-FR", () => {
                // Arrange
                var node = new JsonDoubleNode(0.1234567);

                // Act
                string json = node.ToString();

                // Assert
                Assert.IsNotNull(node);
                Assert.AreEqual("0.1234567", json);
            });
        }