public void GetValue_Success() { var subject = new TestDataPackage(); var expectedKey = "TestKey"; var expectedValue = "My value"; subject[expectedKey] = expectedValue; var result = subject.TestGetValue <string>(expectedKey); Assert.Equal(expectedValue, result); }
public void GetValue_PrimitiveNotFound_Default() { var subject = new TestDataPackage(); var result = subject.TestGetValue <int>("notfound"); Assert.Equal(default, result);
public void GetValue_ThrowsWhenPropertyNull() { var subject = new TestDataPackage(); Assert.Throws <ArgumentNullException>(() => subject.TestGetValue <string>(null)); }