コード例 #1
0
        public void NoNumberIdReturnsNegativeOne()
        {
            var diagnosticAnalyzerInfo = new DiagnosticAnalyzerInfo
            {
                AnalyzerName = "Test Analyzer",
                Id = "No Number"
            };

            Assert.Equal(-1, diagnosticAnalyzerInfo.GetIdNumber());
        }
コード例 #2
0
        public void ExpectedIdFormatWithoutTrailingCharacterReturnsIntId()
        {
            var diagnosticAnalyzerInfo = new DiagnosticAnalyzerInfo
            {
                AnalyzerName = "Test Analyzer",
                Id = "CD0003"
            };

            Assert.Equal(3, diagnosticAnalyzerInfo.GetIdNumber());
        }