Beispiel #1
0
        //-------------------------------------------------------------------------
        public virtual void test_noAdjust()
        {
            LocalDate date = date(2014, AUGUST, 17);

            assertEquals(NONE.adjust(date), date);
            assertEquals(NONE.matches(date), true);
        }
Beispiel #2
0
 public static void OrElse_LeftIdentity()
 {
     Assert.Equal(Ø, NONE.OrElse(Ø));
     Assert.Equal(One, NONE.OrElse(One));
 }
Beispiel #3
0
 public static WSStatus NONE_Copy(byte _UserRole = WSConstants.ACCESS_LEVEL.READ)
 {
     return(NONE.clone(_UserRole));
 }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Nonnull private static java.util.Map<String,String> assertEncryption(@Nonnull String name, @Nonnull Setting<?> setting, @Nonnull Map<String,String> rawConfig) throws org.neo4j.graphdb.config.InvalidSettingException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        private static IDictionary <string, string> AssertEncryption <T1>(string name, Setting <T1> setting, IDictionary <string, string> rawConfig)
        {
            IDictionary <string, string> result = setting.validate(rawConfig, _nullConsumer);

//JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET:
//ORIGINAL LINE: java.util.Optional<?> encryption = java.util.Optional.ofNullable(setting.apply(rawConfig::get));
            Optional <object> encryption = Optional.ofNullable(setting.apply(rawConfig.get));

            if ("https".Equals(name, StringComparison.OrdinalIgnoreCase))
            {
                if (encryption.Present && encryption.get() != TLS)
                {
                    throw new InvalidSettingException(format("'%s' is only allowed to be '%s'; not '%s'", setting.name(), TLS.name(), encryption.get()));
                }
            }
            else if ("http".Equals(name, StringComparison.OrdinalIgnoreCase))
            {
                if (encryption.Present && encryption.get() != NONE)
                {
                    throw new InvalidSettingException(format("'%s' is only allowed to be '%s'; not '%s'", setting.name(), NONE.name(), encryption.get()));
                }
            }

            return(result);
        }