public void CosmosContainerNameProviderGetsNameFromType() { ICosmosContainerNameProvider provider = new DefaultCosmosContainerNameProvider(); string name = provider.GetContainerName <SomethingItem>(); Assert.Equal("SomethingItem", name); }
public void CosmosContainerNameProviderGetsNameFromAttribute() { ICosmosContainerNameProvider provider = new DefaultCosmosContainerNameProvider(); string name = provider.GetContainerName <CustomContainerNameItem>(); Assert.Equal("SomethingCustom", name); }
public void CosmosContainerNameProviderGetsNameForTypeWhenEmptyStringProvidedByOptions() { _repositoryOptions.ContainerBuilder.Configure <SomeOtherItem>(options => options.WithContainer("")); ICosmosContainerNameProvider provider = new DefaultCosmosContainerNameProvider(_options.Object); string name = provider.GetContainerName <SomeOtherItem>(); Assert.Equal("SomeOtherItem", name); }
public void CosmosContainerNameProviderGetsNameForTypeWhenProvidedByOptions() { _repositoryOptions.ContainerBuilder.Configure <CustomTypeOverridenByOptions>(options => options.WithContainer("SomethingDefinedByOptions")); ICosmosContainerNameProvider provider = new DefaultCosmosContainerNameProvider(_options.Object); string name = provider.GetContainerName <CustomTypeOverridenByOptions>(); Assert.Equal("SomethingDefinedByOptions", name); }