public void testConstructComplete() { TestValue = new MembershipValue( TestLinguisticValue, TestFuzzyValue); Assert.AreEqual(TestLinguisticValue, TestValue.linguistic); Assert.AreEqual(TestFuzzyValue, TestValue.fuzzy); }
public void testLinguisticEncode() { TestValue = new MembershipValue( TestLinguisticValue); Assert.AreEqual( TestLinguisticValue, TestValue.encodeCompleteJson().GetField("Name").str); }
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); }
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; }
public void testConstructByLinguistic() { TestValue = new MembershipValue(TestLinguisticValue); Assert.AreEqual(TestLinguisticValue, TestValue.linguistic); }
private int GetSettingValue(MembershipValue membershipValue) { return GetSettingValue(membershipValue, Null.NullInteger); }