Esempio n. 1
0
        public async Task CheckIfExist()
        {
            string webPubSubName = SessionRecording.GenerateAssetName("WebPubSub-");

            _webPubSub = await CreateWebPubSub(webPubSubName);
            await CreatePrivateEndpointConnection(_privateEndPointName);

            var list = await _webPubSub.GetWebPubSubPrivateEndpointConnections().GetAllAsync().ToEnumerableAsync();

            Assert.True(await _webPubSub.GetWebPubSubPrivateEndpointConnections().ExistsAsync(list[0].Data.Name));
            Assert.False(await _webPubSub.GetWebPubSubPrivateEndpointConnections().ExistsAsync(list[0].Data.Name + "01"));
        }
Esempio n. 2
0
        public async Task Get()
        {
            string webPubSubName = SessionRecording.GenerateAssetName("WebPubSub-");

            _webPubSub = await CreateWebPubSub(webPubSubName);
            await CreatePrivateEndpointConnection(_privateEndPointName);

            var list = await _webPubSub.GetWebPubSubPrivateEndpointConnections().GetAllAsync().ToEnumerableAsync();

            var PrivateEndpointConnection = await _webPubSub.GetWebPubSubPrivateEndpointConnections().GetAsync(list[0].Data.Name);

            Assert.NotNull(PrivateEndpointConnection.Value.Data);
            Assert.AreEqual("Approved", PrivateEndpointConnection.Value.Data.ConnectionState.Status.ToString());
        }
Esempio n. 3
0
        public async Task GetAll()
        {
            string webPubSubName = SessionRecording.GenerateAssetName("WebPubSub-");

            _webPubSub = await CreateWebPubSub(webPubSubName);

            var list = await _webPubSub.GetWebPubSubPrivateEndpointConnections().GetAllAsync().ToEnumerableAsync();

            Assert.AreEqual(0, list.Count);
            await CreatePrivateEndpointConnection(_privateEndPointName);

            list = await _webPubSub.GetWebPubSubPrivateEndpointConnections().GetAllAsync().ToEnumerableAsync();

            Assert.AreEqual(1, list.Count);
        }
Esempio n. 4
0
        public async Task Delete()
        {
            string webPubSubName = SessionRecording.GenerateAssetName("WebPubSub-");

            _webPubSub = await CreateWebPubSub(webPubSubName);
            await CreatePrivateEndpointConnection(_privateEndPointName);

            var list = await _webPubSub.GetWebPubSubPrivateEndpointConnections().GetAllAsync().ToEnumerableAsync();

            Assert.AreEqual(1, list.Count);
            foreach (var item in list)
            {
                await item.DeleteAsync(WaitUntil.Completed);
            }
            list = await _webPubSub.GetWebPubSubPrivateEndpointConnections().GetAllAsync().ToEnumerableAsync();

            Assert.AreEqual(0, list.Count);
        }