public void TestGetPropertyStringAllProps_Nulls()
        {
            LoggingExtensionsTests.PropertyStringTestObject obj = new LoggingExtensionsTests.PropertyStringTestObject();

            Assert.AreEqual($"Id: [00000000-0000-0000-0000-000000000000], Name: [*NULL*], NestedObject: [*NULL*], Number: [0], SomeBoolean: [False]",
                            obj.GetPropertyInfoString());
        }
 public void TestGetPropertyString_IsSourceNull()
 {
     LoggingExtensionsTests.PropertyStringTestObject obj = null;
     Assert.IsNull(obj.GetPropertyInfoString("Something"));
     Assert.IsNull(obj.GetPropertyInfoString());
     Assert.IsNull(obj.GetNameAndIdString());
 }
        public void TestGetPropertyString_HappyPath()
        {
            LoggingExtensionsTests.PropertyStringTestObject obj = new LoggingExtensionsTests.PropertyStringTestObject()
            {
                Number       = 3.14M,
                Name         = "Jim Beam",
                SomeBoolean  = true,
                Id           = Guid.NewGuid(),
                NestedObject = new LoggingExtensionsTests.PropertyStringTestObject()
            };

            Assert.AreEqual($"Number: [{obj.Number}], Name: [{obj.Name}], SomeBoolean: [True], Id: [{obj.Id}], NestedObject: [DotNetLittleHelpers.Tests.LoggingExtensionsTests+PropertyStringTestObject]",
                            obj.GetPropertyInfoString(nameof(LoggingExtensionsTests.PropertyStringTestObject.Number), nameof(LoggingExtensionsTests.PropertyStringTestObject.Name), nameof(LoggingExtensionsTests.PropertyStringTestObject.SomeBoolean), nameof(LoggingExtensionsTests.PropertyStringTestObject.Id), nameof(LoggingExtensionsTests.PropertyStringTestObject.NestedObject)));

            Assert.AreEqual($"Id: [{obj.Id}], Name: [Jim Beam], NestedObject: [DotNetLittleHelpers.Tests.LoggingExtensionsTests+PropertyStringTestObject], Number: [{obj.Number}], SomeBoolean: [True]",
                            obj.GetPropertyInfoString());
        }
 public void TestGetPropertyString_Nulls()
 {
     LoggingExtensionsTests.PropertyStringTestObject obj = new LoggingExtensionsTests.PropertyStringTestObject();
     Assert.AreEqual($"Number: [0], Name: [*NULL*], SomeBoolean: [False], Id: [00000000-0000-0000-0000-000000000000], NestedObject: [*NULL*]",
                     obj.GetPropertyInfoString(nameof(LoggingExtensionsTests.PropertyStringTestObject.Number), nameof(LoggingExtensionsTests.PropertyStringTestObject.Name), nameof(LoggingExtensionsTests.PropertyStringTestObject.SomeBoolean), nameof(LoggingExtensionsTests.PropertyStringTestObject.Id), nameof(LoggingExtensionsTests.PropertyStringTestObject.NestedObject)));
 }
 public void TestGetPropertyString_MissingProperty()
 {
     LoggingExtensionsTests.PropertyStringTestObject obj = new LoggingExtensionsTests.PropertyStringTestObject();
     Assert.AreEqual("Name: [*NULL*], SomeRandom: [*NO SUCH PROPERTY*]",
                     obj.GetPropertyInfoString(nameof(LoggingExtensionsTests.PropertyStringTestObject.Name), "SomeRandom"));
 }