public void GetConcAvgsCount_Test() { Continuum thisInst = new Continuum(""); string Filename = testingFolder + "\\MCP testing.cfm"; thisInst.Open(Filename); Met thisMet = thisInst.metList.metItem[0]; MCP thisMCP = thisMet.mcp; // Test 1 thisMCP.ResetMCP("All", thisInst.metList); thisMCP.numWD = 16; thisMCP.numTODs = 2; thisMCP.numSeasons = 4; thisMCP.FindConcurrentData(thisMet.metData.startDate, thisMet.metData.endDate); double[] Avg_WS_WD = thisMCP.GetConcAvgsCount(16, Met.TOD.Day, Met.Season.Winter); // 0: Target WS; 1: Reference WS; 2: Data Count' Assert.AreEqual(Avg_WS_WD[0], 7.590759, 0.01, "Wrong average target wind speed in Test 1"); Assert.AreEqual(Avg_WS_WD[1], 8.161251, 0.01, "Wrong average reference wind speed in Test 1"); Assert.AreEqual(Avg_WS_WD[2], 952, 0, "Wrong data count in Test 1"); // Test 2 thisMCP.numWD = 16; thisMCP.numTODs = 1; thisMCP.numSeasons = 1; Avg_WS_WD = thisMCP.GetConcAvgsCount(15, Met.TOD.All, Met.Season.All); Assert.AreEqual(Avg_WS_WD[2], 524, 0, "Wrong data count in Test 2"); Assert.AreEqual(Avg_WS_WD[0], 5.716328, 0.01, "Wrong average target wind speed in Test 2"); Assert.AreEqual(Avg_WS_WD[1], 5.76551, 0.01, "Wrong average reference wind speed in Test 2"); thisInst.Close(); }