public void ThrowsWhenFileNotFound()
        {
            IFileSystem fileSystem = new MockFileSystem();
            var         loader     = new JsonStatesLoader(fileSystem);

            Assert.Throws <FileNotFoundException>(() => loader.Load("/foo"));
        }
        public void ThrowsWhenPassedNull()
        {
            IFileSystem fileSystem = new MockFileSystem();
            var         loader     = new JsonStatesLoader(fileSystem);

            Assert.Throws <ArgumentNullException>(() => loader.Load(null));
        }
        public void Load()
        {
            var         codec      = new Codec();
            Text        barValue   = (Text)"bar";
            IFileSystem fileSystem = new MockFileSystem(new Dictionary <string, MockFileData>
            {
                { "/foo", new MockFileData($"{{\"foo\": \"{Convert.ToBase64String(codec.Encode(barValue))}\"}}") },
            });
            var loader = new JsonStatesLoader(fileSystem);
            var states = loader.Load("/foo");

            Assert.Single(states);
            Assert.Equal(barValue, states["foo"]);
        }