public void SIMDENFarmType3() { SIMDEN target; target = new SIMDEN(); target.init(1, 3, 1, 1, 1, 1); decimal actual = target.getDenitrification(); decimal expected = 0.892m; Assert.AreEqual(actual, expected); target = new SIMDEN(); target.init(1, 3, 0, 0, 0, 0); actual = target.getDenitrification(); expected = 0.8m; Assert.AreEqual(actual, expected); target = new SIMDEN(); target.init(2, 3, 1, 1, 1, 1); actual = target.getDenitrification(); expected = 1.94m; Assert.AreEqual(actual, expected); target = new SIMDEN(); target.init(2, 3, 0, 0, 0, 0); actual = target.getDenitrification(); expected = 1.8m; Assert.AreEqual(actual, expected); target = new SIMDEN(); target.init(3, 3, 1, 1, 1, 1); actual = target.getDenitrification(); expected = 3.488m; Assert.AreEqual(actual, expected); target = new SIMDEN(); target.init(3, 3, 0, 0, 0, 0); actual = target.getDenitrification(); expected = 3.3m; Assert.AreEqual(actual, expected); target = new SIMDEN(); target.init(4, 3, 1, 1, 1, 1); actual = target.getDenitrification(); expected = 6.884m; Assert.AreEqual(actual, expected); target = new SIMDEN(); target.init(4, 3, 0, 0, 0, 0); actual = target.getDenitrification(); expected = 6.6m; Assert.AreEqual(actual, expected); target = new SIMDEN(); target.init(5, 3, 1, 1, 1, 1); actual = target.getDenitrification(); expected = 11.108m; Assert.AreEqual(actual, expected); target = new SIMDEN(); target.init(5, 3, 0, 0, 0, 0); actual = target.getDenitrification(); expected = 10.8m; Assert.AreEqual(actual, expected); target = new SIMDEN(); target.init(6, 3, 1, 1, 1, 1); actual = target.getDenitrification(); expected = 14.756m; Assert.AreEqual(actual, expected); target = new SIMDEN(); target.init(6, 3, 0, 0, 0, 0); actual = target.getDenitrification(); expected = 14.4m; Assert.AreEqual(actual, expected); target = new SIMDEN(); target.init(7, 3, 1, 1, 1, 1); actual = target.getDenitrification(); expected = 18.804m; Assert.AreEqual(actual, expected); target = new SIMDEN(); target.init(7, 3, 0, 0, 0, 0); actual = target.getDenitrification(); expected = 18.4m; Assert.AreEqual(actual, expected); target = new SIMDEN(); target.init(10, 3, 1, 1, 1, 1); actual = target.getDenitrification(); expected = 27.452m; Assert.AreEqual(actual, expected); target = new SIMDEN(); target.init(10, 3, 0, 0, 0, 0); actual = target.getDenitrification(); expected = 27m; Assert.AreEqual(actual, expected); }
public void SIMDENFarmType1() { bool used = false; SIMDEN target = new SIMDEN(); try { target.getDenitrification(); } catch (Exception e) { string df = e.Message; if (e.Message.Equals("Message: Cannot handle exeption with name \"SIMDEN:Has not been init before receiving output\" and type 1")) { used = true; } } Assert.IsTrue(used); target = new SIMDEN(); target.init(1, 1, 1, 1, 1, 1); decimal actual = target.getDenitrification(); decimal expected = 0.068m; Assert.AreEqual(actual, expected); target = new SIMDEN(); target.init(1, 1, 0, 0, 0, 0); actual = target.getDenitrification(); expected = 0.0m; Assert.AreEqual(actual, expected); target = new SIMDEN(); target.init(2, 1, 1, 1, 1, 1); actual = target.getDenitrification(); expected = 0.592m; Assert.AreEqual(actual, expected); target = new SIMDEN(); target.init(2, 1, 0, 0, 0, 0); actual = target.getDenitrification(); expected = 0.5m; Assert.AreEqual(actual, expected); target = new SIMDEN(); target.init(3, 1, 1, 1, 1, 1); actual = target.getDenitrification(); expected = 1.54m; Assert.AreEqual(actual, expected); target = new SIMDEN(); target.init(3, 1, 0, 0, 0, 0); actual = target.getDenitrification(); expected = 1.4m; Assert.AreEqual(actual, expected); Assert.AreEqual(actual, expected); target = new SIMDEN(); target.init(4, 1, 1, 1, 1, 1); actual = target.getDenitrification(); expected = 2.988m; Assert.AreEqual(actual, expected); target = new SIMDEN(); target.init(4, 1, 0, 0, 0, 0); actual = target.getDenitrification(); expected = 2.8m; Assert.AreEqual(actual, expected); target = new SIMDEN(); target.init(5, 1, 1, 1, 1, 1); actual = target.getDenitrification(); expected = 5.012m; Assert.AreEqual(actual, expected); target = new SIMDEN(); target.init(5, 1, 0, 0, 0, 0); actual = target.getDenitrification(); expected = 4.8m; target = new SIMDEN(); target.init(6, 1, 1, 1, 1, 1); actual = target.getDenitrification(); expected = 7.56m; Assert.AreEqual(actual, expected); target = new SIMDEN(); target.init(6, 1, 0, 0, 0, 0); actual = target.getDenitrification(); expected = 7.3m; target = new SIMDEN(); target.init(7, 1, 1, 1, 1, 1); actual = target.getDenitrification(); expected = 10.508m; Assert.AreEqual(actual, expected); target = new SIMDEN(); target.init(7, 1, 0, 0, 0, 0); actual = target.getDenitrification(); expected = 10.2m; target = new SIMDEN(); target.init(10, 1, 1, 1, 1, 1); actual = target.getDenitrification(); expected = 14.356m; Assert.AreEqual(actual, expected); target = new SIMDEN(); target.init(10, 1, 0, 0, 0, 0); actual = target.getDenitrification(); expected = 14m; Assert.AreEqual(actual, expected); }