public PolicyRetrievalPointTest(PolicyRetrivevalPointFixture fixture)
        {
            _fixture           = fixture;
            _storageConfigMock = new Mock <IOptions <AzureStorageConfiguration> >();
            _storageConfigMock.Setup(s => s.Value).Returns(new AzureStorageConfiguration()
            {
                AccountName       = "devstoreaccount1",
                AccountKey        = "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==",
                MetadataContainer = "metadata",
                BlobEndpoint      = "http://127.0.0.1:10000/devstoreaccount1"
            });

            // connect to azure blob storage
            StorageCredentials  storageCredentials = new StorageCredentials("devstoreaccount1", "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==");
            CloudStorageAccount storageAccount     = new CloudStorageAccount(storageCredentials, true);

            StorageUri storageUrl = new StorageUri(new Uri("http://127.0.0.1:10000/devstoreaccount1"));

            _blobClient    = new CloudBlobClient(storageUrl, storageCredentials);
            _blobContainer = _blobClient.GetContainerReference("metadata");

            _pr  = new PolicyRepository(_storageConfigMock.Object, new Mock <ILogger <PolicyRepository> >().Object);
            _prp = new PolicyRetrievalPoint(_pr);
        }
Exemplo n.º 2
0
 public PolicyRetrievalPointTest()
 {
     _policyRepositoryMock = new Mock <IPolicyRepository>();
     _prp = new PolicyRetrievalPoint(_policyRepositoryMock.Object);
 }