< Summary

Information
Class: NormalizationTests.ObjectPropertiesTests
Assembly: normalizationtests.dll
File(s): C:\skola_karlovka\RP\code\csv-validator\CSV_Validator\Tests\NormalizationTests\ObjectPropertiesTests.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 15
Coverable lines: 15
Total lines: 47
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBlocks covered Blocks not covered
ObjectPropertiesTests()04
GetProjectDirectory()015

File(s)

C:\skola_karlovka\RP\code\csv-validator\CSV_Validator\Tests\NormalizationTests\ObjectPropertiesTests.cs

#LineLine coverage
 1namespace NormalizationTests
 2{
 3    public  class ObjectPropertiesTests
 4    {
 5        public readonly string testFilesDirectory;
 06        public ObjectPropertiesTests()
 07        {
 08            testFilesDirectory = Path.Combine(GetProjectDirectory(), "TestFiles", "ObjectPropertiesTests");
 09        }
 10        static string GetProjectDirectory()
 011        {
 012            string? currentDirectory = Directory.GetCurrentDirectory();
 13
 014            while (!string.IsNullOrEmpty(currentDirectory))
 015            {
 016                string[] projectFiles = Directory.GetFiles(currentDirectory, "*.csproj");
 17
 018                if (projectFiles.Length > 0)
 019                    return currentDirectory;
 020                currentDirectory = Directory.GetParent(currentDirectory)?.FullName;
 021            }
 22
 023            throw new Exception("Could not find project directory.");
 024        }
 25        /*
 26        [Fact]
 27        public void ObjectPropertyReferencedObjectUsingStringTest()
 28        {
 29            string testFilePath = Path.Combine(testFilesDirectory, "testFile1.json");
 30            string jsonString = File.ReadAllText(testFilePath);
 31            JObject jsonObject = JObject.Parse(jsonString);
 32
 33            List<Warning> warnings = new List<Warning>();
 34
 35            Context context = Context.GetContextFromJToken(jsonObject, warnings);
 36            context._base._value = "https://data.mff.cuni.cz/soubory/číselníky/";
 37
 38            var property = jsonObject.Property("table");
 39            ObjectProperty<TableDescriptor>.Normalize(property?.Value!, context, property);
 40
 41            Assert.Equal(typeof(JObject), property.Value.GetType());
 42
 43
 44        }
 45        */
 46    }
 47}