public void ShouldCallVerifierWithCorrectPrefixWhenNotSet() { var system = new SystemUnderTest(); system.ConfigurationApi().CreateServerConfiguration(new CreateRedisWorkerServer { Configuration = "AwesomeServer" }); system.RedisConfigurationVerifier.WasSucessfullyVerifiedWith .Should().Be.EqualTo(("AwesomeServer", DefaultSchemaName.Redis())); }
public void ShouldCreateWithDefaultPrefixAsSchemaName() { var system = new SystemUnderTest(); system.ConfigurationApi().CreateServerConfiguration(new CreateRedisWorkerServer { Prefix = null }); var storedConfiguration = system.ConfigurationStorage.Data.Last(); Assert.AreEqual(DefaultSchemaName.Redis(), storedConfiguration.SchemaName); }
public void ShouldBuildWithDefaultSchemaNameForRedis() { var system = new SystemUnderTest(); var storedConfiguration = new StoredConfiguration { ConnectionString = "redis-roger", SchemaName = null }; system.ConfigurationStorage.Has(storedConfiguration); var result = system.ViewModelBuilder.BuildServerConfigurations(); Assert.AreEqual(DefaultSchemaName.Redis(), result.Single().SchemaName); }