public void DictionaryResourceAndCount_Test_CountElements() { // arrange Dictionary <string, int> expectedDictionaryGroupBy = DataTests.DictionaryGroupBy(); // act List <string> expectedListField = excel.ListField("valid_kmat"); Dictionary <string, int> actualDictionary = excel._groupByFieldAndCount("kmat"); Assert.AreEqual(expectedDictionaryGroupBy.Count, actualDictionary.Count); }
public static void Initialization(TestContext context) { excel = new oExcel(DataTests.GetFullPathExcelFile); dtExcel = excel.ImportDataForExcel(); listField = excel.ListField("kmat"); // Functions.ListFieldKmatForExcel(dtExcel, "kmat"); dictionaryGroupBy = excel._groupByFieldAndCount("kmat"); //DictionaryResourceAndCount(listField); listUnique = excel.ListUniqueField("kmat"); //new List<string>(); // Functions.ListUniqueFieldResource(dictionaryGroupBy); // = DoubleKmat.ToArray(); }