public void TestGetNameIdPropertyString_Defaults() { var obj = new LoggingExtensionsTests.NameIdStringTestObject(); Assert.AreEqual("Id: [0], Name: [*NULL*], NameOfSomething: [*NULL*], UserGuid: [00000000-0000-0000-0000-000000000000]", obj.GetNameAndIdString()); }
public void TestGetNameIdPropertyString() { var obj = new LoggingExtensionsTests.NameIdStringTestObject() { Id = 2, IdStartingProp = "Boo", Name = "JackDaniels", NameOfSomething = "BillyJean", UserGuid = Guid.NewGuid(), SomethingElse = "Elsewhere" }; Assert.AreEqual($"Id: [2], Name: [JackDaniels], NameOfSomething: [BillyJean], UserGuid: [{obj.UserGuid}]", obj.GetNameAndIdString()); }