public void MethodManager_LoadMethods_Normal_Passed() { //Arrange string fileName = @"C:\Users\Andrew\Documents\GitHub\Vk.DTO.API\VkApi\bin\Debug\Params.xml"; string expected_name = "messages.get"; Dictionary <string, VkMethod> methodsList = new Dictionary <string, VkMethod>(); VkMethodManager manager = new VkMethodManager(); //Act manager.LoadMethods(fileName); //Assert Assert.AreEqual(expected_name, manager.methods["messages.get"].Name); }
public void SetMethod_MessagesGet_Passed() { //Arrange VkMethodManager manager = new VkMethodManager(); manager.LoadMethods(@"C:\Users\Andrew\Documents\GitHub\Vk.DTO.API\VkApi\bin\Debug\Params.xml"); VkMethod expecteMethod = new VkMethod("messages.get"); VkParameter count = new VkParameter("count", "", true, "20"); VkParameter inbox = new VkParameter("out", "", true, "0"); expecteMethod.AddParameter(count); expecteMethod.AddParameter(inbox); //Act //IMethod actulaMethod = manager.SetMethod(new NameValueCollection()); //Assert //Assert.AreEqual(expected: expecteMethod.Name, actual: actulaMethod.Name); }