public void CppCheckLocation_CanBeConvertedToSarifIssue()
        {
            PhysicalLocation result = new CppCheckLocation("foo.cpp", 42).ToSarifPhysicalLocation();

            Assert.True(
                result.ValueEquals(
                    new PhysicalLocation
            {
                Uri    = new Uri("foo.cpp", UriKind.RelativeOrAbsolute),
                Region = new Region {
                    StartLine = 42
                }
            }));
        }
Beispiel #2
0
        public void CppCheckLocation_CanBeConvertedToSarifIssue()
        {
            PhysicalLocation result = new CppCheckLocation(ExampleFileName, 42).ToSarifPhysicalLocation();

            Assert.True(
                result.ValueEquals(
                    new PhysicalLocation
            {
                ArtifactLocation = new ArtifactLocation
                {
                    Uri = new Uri(ExampleFileName, UriKind.RelativeOrAbsolute)
                },
                Region = new Region {
                    StartLine = 42
                }
            }));
        }