Ejemplo n.º 1
0
        public void GetSurveyAnswerIdsReturnsList()
        {
            var azureBlobContainerMock = new Mock <IAzureBlobContainer <List <string> > >();

            azureBlobContainerMock.Setup(b => b.Get("tenant-slug")).Returns(new List <string>()
            {
                "1", "2", "3"
            });

            var surveyStore = new SurveyAnswerStore(null, null, null, null, azureBlobContainerMock.Object);
            var answers     = surveyStore.GetSurveyAnswerIds("tenant", "slug");

            Assert.AreEqual(3, answers.Count());

            azureBlobContainerMock.Verify(b => b.Get("tenant-slug"), Times.Once());
        }
        public void GetSurveyAnswerIdsReturnsList()
        {
            var azureBlobContainerMock = new Mock<IAzureBlobContainer<List<string>>>();
            azureBlobContainerMock.Setup(b => b.Get("tenant-slug")).Returns(new List<string>() { "1", "2", "3" });

            var surveyStore = new SurveyAnswerStore(null, null, null, null, azureBlobContainerMock.Object);
            var answers = surveyStore.GetSurveyAnswerIds("tenant", "slug");

            Assert.AreEqual(3, answers.Count());

            azureBlobContainerMock.Verify(b => b.Get("tenant-slug"), Times.Once());
        }