コード例 #1
0
        public void ItReturnsThePromptNameWhenThePromptNameIsNotPrefixedWithUnderscoreA()
        {
            const string promptName = "PromptName_Alias";

            var promptReportNameParser = new NativePromptReportNameParser();

            var promptReportName = promptReportNameParser.Parse(promptName);

            Assert.AreEqual(promptName, promptReportName);
        }
コード例 #2
0
        public void ItReturnsThePromptNameWhenItDoesNotContainAnUnderscore()
        {
            const string promptName = "PromptName";

            var promptReportNameParser = new NativePromptReportNameParser();

            var promptReportName = promptReportNameParser.Parse(promptName);

            Assert.AreEqual(promptName, promptReportName);
        }
コード例 #3
0
        public void ItRemovesTheAUnderscorePrefixAndReturnsEverythingBeforeTheFinalUnderscoreWhenThereAreTwoUnderscores()
        {
            const string expectedPromptReportName = "Prompt_Name";
            var promptName = string.Format("A_{0}_Alias", expectedPromptReportName);

            var promptReportNameParser = new NativePromptReportNameParser();

            var promptReportName = promptReportNameParser.Parse(promptName);

            Assert.AreEqual(expectedPromptReportName, promptReportName);
        }
コード例 #4
0
        public void ItReturnsEverythingBeforeTheUnderscoreWhenThePromptNameContainsAnUnderscoreWhenThePromptNameStartsWithAUnderscore()
        {
            const string expectedPromptReportName = "PromptName";

            var promptName = string.Format("A_{0}_Alias", expectedPromptReportName);

            var promptReportNameParser = new NativePromptReportNameParser();

            var promptReportName = promptReportNameParser.Parse(promptName);

            Assert.AreEqual(expectedPromptReportName, promptReportName);
        }