public void deveRemoverChavePassada() { NewCollection collection = new NewCollection(); collection.Add("ano", "1979"); collection.Add("mes", "Agosto"); collection.Add("dia", "02"); collection.Remove("ano"); IList <string> retorno = new List <string>(); retorno = collection.Get("ano", 0, 2); IList <string> result = new List <string>(); Assert.AreEqual(result.ToString(), retorno.ToString()); }
public void deveRetornarListaDoPrimeiroAoPenultimo() { NewCollection collection = new NewCollection(); collection.Add("ano", "1979"); collection.Add("ano", "1994"); collection.Add("ano", "2007"); IList <string> retorno = new List <string>(); retorno = collection.Get("ano", -1, -2); IList <string> result = new List <string>(); result.Add("1979"); result.Add("1994"); Assert.AreEqual(result.ToString(), retorno.ToString()); }
public void deveRetornarListaComTodosItensDaChave() { NewCollection collection = new NewCollection(); collection.Add("ano", "1979"); collection.Add("ano", "1994"); collection.Add("ano", "2007"); IList <string> retorno = new List <string>(); retorno = collection.Get("ano", 0, 4); IList <string> result = new List <string>(); result.Add("1979"); result.Add("1994"); result.Add("2007"); Assert.AreEqual(result.ToString(), retorno.ToString()); }