Exemplo n.º 1
0
        public void ToString_NotModified()
        {
            textProperty.IsModified = false;

            String actual   = new LoggableProperty(textProperty, "Originalê").ToString();
            String expected = $"{textProperty.Metadata.Name}: \"Originalê\"";

            Assert.Equal(expected, actual);
        }
Exemplo n.º 2
0
        public void ToString_Modified_Json()
        {
            textProperty.CurrentValue = "Current\r\nValue";
            textProperty.IsModified   = true;

            String expected = $"{textProperty.Metadata.Name}: 157.45 => \"Current\\r\\nValue\"";
            String actual   = new LoggableProperty(textProperty, 157.45).ToString();

            Assert.Equal(expected, actual);
        }
Exemplo n.º 3
0
        public void ToString_Modified_Date()
        {
            dateProperty.CurrentValue = new DateTime(2014, 6, 8, 14, 16, 19);
            dateProperty.IsModified   = true;

            String expected = $"{dateProperty.Metadata.Name}: \"2010-04-03 18:33:17\" => \"2014-06-08 14:16:19\"";
            String actual   = new LoggableProperty(dateProperty, new DateTime(2010, 4, 3, 18, 33, 17)).ToString();

            Assert.Equal(expected, actual);
        }
Exemplo n.º 4
0
        public void ToString_Modified_OriginalValueNull()
        {
            textProperty.CurrentValue = "Current";
            textProperty.IsModified   = true;

            String expected = $"{textProperty.Metadata.Name}: null => \"Current\"";
            String actual   = new LoggableProperty(textProperty, null).ToString();

            Assert.Equal(expected, actual);
        }
Exemplo n.º 5
0
        public void ToString_Modified_CurrentValueNull()
        {
            textProperty.CurrentValue = null;
            textProperty.IsModified   = true;

            String actual   = new LoggableProperty(textProperty, "Original").ToString();
            String expected = $"{textProperty.Metadata.Name}: \"Original\" => null";

            Assert.Equal(expected, actual);
        }
Exemplo n.º 6
0
        public void ToString_NotModified_Json()
        {
            textProperty.CurrentValue = "Current\r\nValue";
            textProperty.IsModified   = false;

            String actual   = new LoggableProperty(textProperty, "Original\r\nValue").ToString();
            String expected = $"{textProperty.Metadata.Name}: \"Original\\r\\nValue\"";

            Assert.Equal(expected, actual);
        }
Exemplo n.º 7
0
        public void ToString_NotModified_Date()
        {
            dateProperty.CurrentValue = new DateTime(2014, 6, 8, 14, 16, 19);
            dateProperty.IsModified   = false;

            String actual   = new LoggableProperty(dateProperty, new DateTime(2014, 6, 8, 14, 16, 19)).ToString();
            String expected = $"{dateProperty.Metadata.Name}: \"2014-06-08 14:16:19\"";

            Assert.Equal(expected, actual);
        }