public void GetObjectProperties_ArgumentNullException() { const object rawObject = null; // ReSharper disable once AssignNullToNotNullAttribute Assert.Catch <ArgumentNullException>(() => _ = ObjectUtil.GetObjectProperties(rawObject)); }
public void GetObjectProperties() { var expectedDict = new Dictionary <string, string> { ["PublicProperty"] = "Apple", ["PublicComputedProperty"] = "Backs", ["IntegerProperty"] = "-42", }; CollectionAssert.AreEquivalent(expectedDict, ObjectUtil.GetObjectProperties(new Foo())); }
public override IReadOnlyDictionary <string, string> RawProperties() => ObjectUtil.GetObjectProperties(SyntaxTrivia);