public void ItShouldGetAllQuerysForAGivenProject()
        {
            var mockProxy = new Mock<ITFSQueryProxy>();
            var queries = new List<Query>();

            queries.Add(new Query { Name = "Query 01", Description = "This is the first query", Project = "Project 1" });
            queries.Add(new Query { Name = "Query 02", Description = "This is the second query", Project = "Project 1" });

            mockProxy.Setup(p => p.GetQueriesByProject(It.Is<string>(s => s == "Project 1")))
                 .Returns(queries)
                 .Verifiable();

            var repository = new QueryRepository(mockProxy.Object);
            var results = repository.GetQueriesByProject("Project 1");

            Assert.IsTrue(results.SequenceEqual<Query>(queries), "The expected queries for a project don't match the results");
            mockProxy.VerifyAll();
        }
        public void ItShouldGetOneQuery()
        {
            var mockProxy = new Mock<ITFSQueryProxy>();
            var queries = new List<Query>();
            var queryId = Guid.NewGuid();

            var expectedQuery = new Query { Id = queryId.ToString(), Description = "This is the first query", Name = "Query 1", Path = "$/sampleproject/Query 1", Project = "sampleproject", QueryText = "Query", QueryType = "Type", WorkItems = new List<WorkItem>() };

            mockProxy.Setup(p => p.GetQuery(queryId))
                 .Returns(expectedQuery)
                 .Verifiable();

            var repository = new QueryRepository(mockProxy.Object);

            var query = repository.GetOne(queryId.ToString());

            Assert.IsTrue(query != null);
            Assert.AreEqual(query.Id, queryId.ToString());
            Assert.AreEqual(query.Description, "This is the first query");
        }