Exemplo n.º 1
0
 public void testConstructComplete()
 {
     TestValue = new MembershipValue(
         TestLinguisticValue, TestFuzzyValue);
     Assert.AreEqual(TestLinguisticValue, TestValue.linguistic);
     Assert.AreEqual(TestFuzzyValue, TestValue.fuzzy);
 }
Exemplo n.º 2
0
 public void testLinguisticEncode()
 {
     TestValue = new MembershipValue(
         TestLinguisticValue);
     Assert.AreEqual(
         TestLinguisticValue,
         TestValue.encodeCompleteJson().GetField("Name").str);
 }
Exemplo n.º 3
0
 public void CompleteDecode()
 {
     TestValue = new MembershipValue(
         TestLinguisticValue, TestFuzzyValue);
     Assert.AreEqual(
         TestLinguisticValue,
         TestValue.encodeCompleteJson().GetField("Name").str);
     Assert.AreEqual(
         TestFuzzyValue,
         TestValue.encodeCompleteJson().GetField("Value").f,
         0.01d);
 }
Exemplo n.º 4
0
        private int GetSettingValue(MembershipValue membershipValue, int defaultValue)
        {
            MembershipSection m = (MembershipSection)WebConfigurationManager.GetSection(Const.Membership.CONFIG_SECTION_STRING);

            ProviderSettings settings = m.Providers[Const.Membership.DEFAULT_PROVIDER];

            int iValue = Utils.SafeParseInt(settings.Parameters[membershipValue.ToString()]);

            if (iValue <= 0 && defaultValue != Null.NullInteger)
            {
                iValue = defaultValue;
            }

            return iValue;
        }
Exemplo n.º 5
0
 public void testConstructByLinguistic()
 {
     TestValue = new MembershipValue(TestLinguisticValue);
     Assert.AreEqual(TestLinguisticValue, TestValue.linguistic);
 }
Exemplo n.º 6
0
 private int GetSettingValue(MembershipValue membershipValue)
 {
     return GetSettingValue(membershipValue, Null.NullInteger);
 }