Sitecore.FakeDb.Data.DataProviders.FakeDataProvider.GetProperty C# (CSharp) Method

GetProperty() public method

Get the property.
public GetProperty ( string name, Sitecore.Data.DataProviders.CallContext context ) : string
name string The property name.
context Sitecore.Data.DataProviders.CallContext The context. Ignored.
return string
    public override string GetProperty(string name, CallContext context)
    {
      Assert.ArgumentNotNull(name, "name");
      var currentProp = this.properties.Value;
      if (currentProp == null)
      {
        return null;
      }

      return currentProp.ContainsKey(name) ? currentProp[name] : null;
    }

Usage Example

 public void ShouldResetPropertyAndReturnTheLatestValue(FakeDataProvider sut, string name, string value1, string value2, CallContext context)
 {
   sut.SetProperty(name, value1, context);
   sut.SetProperty(name, value2, context);
   sut.GetProperty(name, context).Should().Be(value2);
 }
All Usage Examples Of Sitecore.FakeDb.Data.DataProviders.FakeDataProvider::GetProperty