public void BeAbleToTellItIsNotEqualToANullObject() { DateField firstDateField = new DateField("Fecha"); IField firstNewDateField = firstDateField.FillAndClone("2008-09-22T14:01:54Z"); Assert.IsFalse(firstNewDateField.Equals(null)); }
public void ReturnANewIFieldWhenFilled() { DateField dateField = new DateField("Fecha"); IField newDateField = dateField.FillAndClone("2008-09-22T14:01:54Z"); Assert.AreNotSame(dateField, newDateField); }
public void AllowToBeFilled() { DateField dateField = new DateField("Fecha"); IField newDateField = dateField.FillAndClone("2008-09-22T14:01:54Z"); DateTime expectedResult = DateTime.Parse("2008-09-22T14:01:54Z"); Assert.AreEqual(expectedResult.ToString("yyyy-MM-ddTHH:mm:ssZ"), newDateField.GetData()); }
public void BeAbleToTellItIsNotEqualToAnotherDateFieldWithSameNameAndDifferentData() { DateField firstDateField = new DateField("Fecha"); DateField secondDateField = new DateField("Fecha"); IField firstNewDateField = firstDateField.FillAndClone("2008-09-22T14:01:54Z"); IField secondNewDateField = secondDateField.FillAndClone("2015-10-26T14:01:54Z"); Assert.IsFalse(firstNewDateField.Equals(secondNewDateField)); }
public void BeAbleToTellItIsNotEqualToAnotherTypeOfField() { DateField aDateField = new DateField("Fecha"); IField aNewDateField = aDateField.FillAndClone("2008-09-22T14:01:54Z"); NumberField aNumberField = new NumberField("Monto"); Assert.IsFalse(aNewDateField.Equals(aNumberField)); }
public void HaveTheNecessaryCompletedFields() { List <IField> list = new List <IField>(); DateField datefield = new DateField("Fecha"); NumberField numberField = new NumberField("Monto"); list.Add(numberField); list.Add(datefield); Provider provider = new Provider("Antel", 20, list); IField completedDateField = datefield.FillAndClone("2012-09-17T22:02:51Z"); IField completedNumberField = numberField.FillAndClone("8000"); List <IField> completedFields = new List <IField>(); completedFields.Add(completedDateField); completedFields.Add(completedNumberField); Receipt receipt = new Receipt(provider, completedFields, 0); }
public void FailWhenTheProvidedDateIsNotInGMTFormat() { DateField dateField = new DateField("Fecha"); IField newDateField = dateField.FillAndClone("05/09/2016"); }
public void FailWhenDataToBeFilledWithIsNotValidDateTime() { DateField dateField = new DateField("Fecha"); IField newDateField = dateField.FillAndClone("hola"); }
public void FailWhenDataToBeFilledWithIsNull() { DateField dateField = new DateField("Fecha"); IField newDateField = dateField.FillAndClone(null); }