public void TestGetPropertyString_MissingProperty1985170568() { PropertyStringTestObject obj = new PropertyStringTestObject(); Assert.AreEqual("Name: [*NULL*], SomeRandom: [*NO SUCH PROPERTY*]", obj.GetPropertyInfoString(nameof(PropertyStringTestObject.Name), "SomeRandom")); }
public void TestGetPropertyString_Nulls312297160() { PropertyStringTestObject obj = new PropertyStringTestObject(); Assert.AreEqual($"Number: [0], Name: [*NULL*], SomeBoolean: [False], Id: [00000000-0000-0000-0000-000000000000], NestedObject: [*NULL*]", obj.GetPropertyInfoString(nameof(PropertyStringTestObject.Number), nameof(PropertyStringTestObject.Name), nameof(PropertyStringTestObject.SomeBoolean), nameof(PropertyStringTestObject.Id), nameof(PropertyStringTestObject.NestedObject))); }
public void TestGetPropertyStringAllProps_Nulls367708067() { PropertyStringTestObject obj = new PropertyStringTestObject(); Assert.AreEqual($"Id: [00000000-0000-0000-0000-000000000000], Name: [*NULL*], NestedObject: [*NULL*], Number: [0], SomeBoolean: [False]", obj.GetPropertyInfoString()); }
public void TestGetPropertyString_IsSourceNull1213458744() { PropertyStringTestObject obj = null; Assert.IsNull(obj.GetPropertyInfoString("Something")); Assert.IsNull(obj.GetPropertyInfoString()); Assert.IsNull(obj.GetNameAndIdString()); }
public void TestGetPropertyString_HappyPath2079862639() { PropertyStringTestObject obj = new PropertyStringTestObject() { Number = 3.14M, Name = "Jim Beam", SomeBoolean = true, Id = Guid.NewGuid(), NestedObject = new PropertyStringTestObject() }; Assert.AreEqual($"Number: [{obj.Number}], Name: [{obj.Name}], SomeBoolean: [True], Id: [{obj.Id}], NestedObject: [DotNetLittleHelpers.Tests.LoggingExtensionsTests+PropertyStringTestObject]", obj.GetPropertyInfoString(nameof(PropertyStringTestObject.Number), nameof(PropertyStringTestObject.Name), nameof(PropertyStringTestObject.SomeBoolean), nameof(PropertyStringTestObject.Id), nameof(PropertyStringTestObject.NestedObject))); Assert.AreEqual($"Id: [{obj.Id}], Name: [Jim Beam], NestedObject: [DotNetLittleHelpers.Tests.LoggingExtensionsTests+PropertyStringTestObject], Number: [{obj.Number}], SomeBoolean: [True]", obj.GetPropertyInfoString()); }