コード例 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void returns_nothing_if_none_defined()
        public virtual void ReturnsNothingIfNoneDefined()
        {
            assertThat(CustomNameExtractor.GetName(() => "", () => "")).Empty;
            assertThat(CustomNameExtractor.GetName(() => "   ", () => "")).Empty;
            assertThat(CustomNameExtractor.GetName(() => "", () => "   ")).Empty;
            assertThat(CustomNameExtractor.GetName(() => "   ", () => "   ")).Empty;
        }
コード例 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void favours_name_over_value()
        public virtual void FavoursNameOverValue()
        {
            assertThat(CustomNameExtractor.GetName(() => "name", () => "value")).contains("name");
            assertThat(CustomNameExtractor.GetName(() => "name", () => "")).contains("name");
            assertThat(CustomNameExtractor.GetName(() => "name", () => "  ")).contains("name");
            assertThat(CustomNameExtractor.GetName(() => "   name  ", () => "  ")).contains("name");
        }
コード例 #3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void returns_value_if_trimmed_name_is_empty()
        public virtual void ReturnsValueIfTrimmedNameIsEmpty()
        {
            assertThat(CustomNameExtractor.GetName(() => "", () => "value")).contains("value");
            assertThat(CustomNameExtractor.GetName(() => "   ", () => "value")).contains("value");
            assertThat(CustomNameExtractor.GetName(() => "   ", () => "   value  ")).contains("value");
        }