public void Apply_5() { var msf1 = new MembershipFunction { { 1, 0.5 } }; var msf2 = new MembershipFunction { { 1, 1 } }; var expected = new MembershipFunction { { 1, 1.5 } }; var sut = new SumMsfMergingStrategy(); var result = sut.Apply(new[] { msf1, msf2 }); Assert.AreEqual(expected, result); }
public void Merge_7() { var msf1 = new MembershipFunction { { 1, 1 } }; var msf2 = new MembershipFunction(); var sut = new SumMsfMergingStrategy(); var result = sut.Apply(new [] { msf1, msf2 }); Assert.AreEqual(msf1, result); result = sut.Apply(new[] { msf2, msf1 }); Assert.AreEqual(msf1, result); }
public void Merge_6() { var expected = new MembershipFunction(); var sut = new SumMsfMergingStrategy(); var result = sut.Apply(new MembershipFunction[] { }); Assert.AreEqual(expected, result); }