コード例 #1
0
		public void Valid()
		{
			IAggregation S = new Average();
			S.crisp_input = new double[3]{1, 1, 1};
			Assert.AreEqual(1, S.calculate_crisp(), "");
			S.crisp_input = new double[3]{1, 2, 3};
			Assert.AreEqual(2, S.calculate_crisp(), "");
			S.crisp_input = new double[1]{1};
			Assert.AreEqual(1, S.calculate_crisp(), "");
		}
コード例 #2
0
		public void EmptyInput()
		{
			IAggregation S = new Average();
			Assert.Throws(typeof(MissingFieldException), delegate{S.calculate_crisp();}, "");
		}