public void GivenASerializer_WhenSerializing_ThenWeGetJsonString() { var serializer = new StrategySettingsSerializer(); var json = "{\"IsOn\":true}"; var results = serializer.Serialize(new IsOnStrategySettings { IsOn = true }); results.Should().Be(json); }
public async Task GivenIsOffStrategy_WhenEvaluating_ThenIGetOff() { var serializer = new StrategySettingsSerializer(); var strategy = new IsOnStrategy { Settings = new IsOnStrategySettings { IsOn = false } }; await this .GivenEvaluatorFactory() .WhenEvaluating(StrategyNames.IsOn, serializer.Serialize(strategy.Settings)) .ThenIGet(strategy); }