public void CanRetrieveTheResourceDirectoruRepeatedly() { var source = new StandaloneAzureLocalResourceSource(_standaloneConfiguration, BasePath); var resource = source["TestStorage"]; resource.ToExpectedObject().ShouldMatch(source["TestStorage"]); }
public void ResourceDirectoryCreatedOnRetreival() { var source = new StandaloneAzureLocalResourceSource(_standaloneConfiguration, BasePath); var resource = source["TestStorage"]; Assert.True(Directory.Exists(resource.RootPath)); }
public void CanRetreiveSettingsFromFile() { var source = new StandaloneAzureLocalResourceSource(_standaloneConfiguration, BasePath); new { MaximumSizeInMegabytes = 512, Name = "TestStorage", RootPath = DetermineResourceDirectoryPath("TestStorage") }.ToExpectedObject().ShouldMatch(source["TestStorage"]); }
public LightBlueAppDomainContext(string configurationPath, string serviceDefinitionPath, string roleName, bool useHostedStorage) { _roleName = roleName; var configuration = new StandaloneConfiguration { ConfigurationPath = configurationPath, ServiceDefinitionPath = serviceDefinitionPath, RoleName = roleName, UseHostedStorage = useHostedStorage, }; _settings = new StandaloneAzureSettings(configuration); _localResources = new StandaloneAzureLocalResourceSource(configuration, StandaloneEnvironment.LightBlueDataDirectory); }
public void RetreivingUnknownResourceThrowsRoleEnvironmentExceptionForRoleWithNoResources() { var source = new StandaloneAzureLocalResourceSource(_standaloneConfiguration, BasePath); Assert.Throws <RoleEnvironmentException>(() => source["unknown"]); }