Beispiel #1
0
        public void ReturnAValidObject()
        {
            var river       = new River();
            var riverString = JsonConvert.SerializeObject(river);

            CloudQueueMock.Setup(m => m.PeekMessageAsync()).Returns(Task.FromResult(new CloudQueueMessage(riverString)));
            var msg = Builder.Peek("favorite-river-queue");

            Assert.IsType <string>(msg);
        }
        public async void GetMessage()
        {
            var river       = new River();
            var riverString = JsonConvert.SerializeObject(river);

            CloudQueueMock.Setup(m => m.GetMessageAsync()).Returns(Task.FromResult(new CloudQueueMessage(riverString)));

            var msg = await Builder.GetQueueMessageAsync <River>("favorite-river-queue");

            Assert.IsType <River>(msg);
        }