Example #1
0
        public void Root_Must_Not_Be_Null()
        {
            // arrange
            // act
            var map = new DefaultQueryFileMap();

            // assert
            Assert.NotNull(map.Root);
        }
Example #2
0
        public void MapToFilePath()
        {
            // arrange
            var map = new DefaultQueryFileMap();

            // act
            var path = map.MapToFilePath("abc_def");

            // assert
            Assert.Equal(IOPath.Combine(map.Root, "abc_def.graphql"), path);
        }
Example #3
0
        public void MapToFilePath_QueryId_Is_Null(string queryId)
        {
            // arrange
            var map = new DefaultQueryFileMap();

            // act
            Action action = () => map.MapToFilePath(queryId);

            // assert
            Assert.Throws <ArgumentNullException>(action);
        }
Example #4
0
        public void MapToFilePath_Convert_Base64_To_UrlCompatibleBase64_2()
        {
            // arrange
            var map = new DefaultQueryFileMap();

            // act
            var path = map.MapToFilePath("/+=========");

            // assert
            Assert.Equal(IOPath.Combine(map.Root, "-_.graphql"), path);
        }