< Summary

Information
Class: ResultWriterTests.RdfResultWriterTests
Assembly: resultwritertests.dll
File(s): C:\skola_karlovka\RP\code\csv-validator\CSV_Validator\Tests\ResultWriterTests\RdfResultWriterTests.cs
Line coverage
100%
Covered lines: 45
Uncovered lines: 0
Coverable lines: 45
Total lines: 73
Line coverage: 100%
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

File(s)

C:\skola_karlovka\RP\code\csv-validator\CSV_Validator\Tests\ResultWriterTests\RdfResultWriterTests.cs

#LineLine coverage
 1using ValidateLib.ResultCreators;
 2using ValidateLib.Results;
 3
 4namespace ResultWriterTests
 5{
 6    public class RdfResultWriterTests : BaseTest
 7    {
 8        [Fact]
 9        public void WriterCreatesAFile()
 110        {
 111            var resultWriter = ResultWriterFactory.CreateResultWriter(ResultFileFormat.RDF);
 112            var pathNonExisting = "non_existing_.ttl";
 113            resultWriter.GenerateResult(pathNonExisting, new TableGroupValidationResultDetails());
 114            Assert.True(File.Exists(pathNonExisting));
 115        }
 16
 17        [Fact]
 18        public void WriterCreatesNonEmptyFile()
 119        {
 120            var resultWriter = ResultWriterFactory.CreateResultWriter(ResultFileFormat.RDF);
 121            var pathNonExisting = "non_existing_.ttl";
 122            resultWriter.GenerateResult(pathNonExisting, new TableGroupValidationResultDetails());
 123            var content = File.ReadAllText(pathNonExisting);
 124            Assert.True(content != string.Empty);
 125        }
 26
 27
 28        [Fact]
 29        public void WriterCreatesNonEmptyFileWithGeneralError()
 130        {
 131            var resultWriter = ResultWriterFactory.CreateResultWriter(ResultFileFormat.RDF);
 132            var pathNonExisting = "non_existing_.ttl";
 133            var tableGroupResults = GetResultWithGeneralError();
 134            resultWriter.GenerateResult(pathNonExisting, tableGroupResults);
 135            var content = File.ReadAllText(pathNonExisting);
 136            Assert.True(content != string.Empty);
 137        }
 38
 39        [Fact]
 40        public void WriterCreatesNonEmptyFileWithGeneralWarning()
 141        {
 142            var resultWriter = ResultWriterFactory.CreateResultWriter(ResultFileFormat.RDF);
 143            var pathNonExisting = "non_existing_.ttl";
 144            var tableGroupResults = GetResultWithGeneralWarning();
 145            resultWriter.GenerateResult(pathNonExisting, tableGroupResults);
 146            var content = File.ReadAllText(pathNonExisting);
 147            Assert.True(content != string.Empty);
 148        }
 49
 50        [Fact]
 51        public void WriterCreatesNonEmptyFileWithTableError()
 152        {
 153            var resultWriter = ResultWriterFactory.CreateResultWriter(ResultFileFormat.RDF);
 154            var pathNonExisting = "non_existing_.ttl";
 155            var tableGroupResults = GetResultWithTableError();
 156            resultWriter.GenerateResult(pathNonExisting, tableGroupResults);
 157            var content = File.ReadAllText(pathNonExisting);
 158            Assert.True(content != string.Empty);
 159        }
 60
 61        [Fact]
 62        public void WriterCreatesNonEmptyFileWithTableWarning()
 163        {
 164            var resultWriter = ResultWriterFactory.CreateResultWriter(ResultFileFormat.RDF);
 165            var pathNonExisting = "non_existing_.ttl";
 166            var tableGroupResults = GetResultWithTableWarning();
 167            resultWriter.GenerateResult(pathNonExisting, tableGroupResults);
 168            var content = File.ReadAllText(pathNonExisting);
 169            Assert.True(content != string.Empty);
 170        }
 71
 72    }
 73}