public void LamaCalculatesProperlySingleElement() { var set = this.GetReferenceSet(); var cardinalities = new SortedList<TwoTuple, int>(); cardinalities.Add(new TwoTuple(set[2], 0.33m), 5); ILamaCalculator lamaCalculator = new LamaCalculator(); TwoTuple result = lamaCalculator.LinguisticLama(cardinalities, set); Assert.NotNull(result); Assert.AreEqual(set[2], result.Label); Assert.AreEqual(0.33m, result.Alpha); }
public void LamaThrowsIfEmtpyCardinalities() { ILamaCalculator lamaCalculator = new LamaCalculator(); Assert.Throws<ArgumentNullException>(() => lamaCalculator.LinguisticLama(null, new LabelSet())); }
public void LamaThrowsIfEmptyReferenceSet() { ILamaCalculator lamaCalculator = new LamaCalculator(); Assert.Throws<ArgumentNullException>(() => lamaCalculator.LinguisticLama(new SortedList<TwoTuple, int>(), null)); }
public void LamaThrowsIfEmptyArguments() { ILamaCalculator lamaCalculator = new LamaCalculator(); Assert.Throws<ArgumentNullException>(() => lamaCalculator.LinguisticLama(null, null)); }