public static void ExpectedIdFormatWithoutTrailingCharacterReturnsIntId()
        {
            var diagnosticAnalyzerInfo = new DiagnosticAnalyzerInfo
            {
                AnalyzerName = "Test Analyzer",
                Id           = "CD0003"
            };

            Assert.Equal(3, diagnosticAnalyzerInfo.GetIdNumber());
        }
        public static void NoNumberIdReturnsNegativeOne()
        {
            var diagnosticAnalyzerInfo = new DiagnosticAnalyzerInfo
            {
                AnalyzerName = "Test Analyzer",
                Id           = "No Number"
            };

            Assert.Equal(-1, diagnosticAnalyzerInfo.GetIdNumber());
        }
Exemplo n.º 3
0
        public void EmptyIdReturnsNegativeOne()
        {
            var diagnosticAnalyzerInfo = new DiagnosticAnalyzerInfo
            {
                AnalyzerName = "Test Analyzer",
                Id           = string.Empty
            };

            Assert.Equal(-1, diagnosticAnalyzerInfo.GetIdNumber());
        }