Esempio n. 1
0
        public async Task FileSharing_WithAuthorizeUser_ReturnsExpectedAllNodes()
        {
            var fileResponse = await JohnApi.GetNodes();

            var nodes = JToken.Parse(await fileResponse.Content.ReadAsStringAsync());

            nodes.Should().HaveCount(4);

            var fileNames = new[]
            {
                "ringcount_0.mol",
                "Aspirin.mol"
            };

            foreach (var node in nodes)
            {
                if (node["type"].ToObject <string>() == "File")
                {
                    fileNames.Contains(node["name"].ToObject <string>()).Should().BeTrue();
                }
            }
        }