Fix some tests

This commit is contained in:
2014-05-10 22:47:47 -04:00
parent 1370400f2e
commit 370b73d894
3 changed files with 14 additions and 14 deletions
Binary file not shown.
+2 -2
View File
@@ -17,14 +17,14 @@ namespace Web.Tests.DAL
Assert.That(logs.Count(), Is.GreaterThan(0));
var first = logs.First();
Assert.That(first.VehicleId, Is.EqualTo("3572"));
Assert.That(first.Date, Is.EqualTo("3/4/2013"));
Assert.That(first.Date, Is.EqualTo("2/5/2014"));
}
[Test]
[ExpectedException(typeof(LogImportException))]
public void Import_Incorrect_ColumnHeaders()
{
LogImporter.Import(LogFolder + "Logs_IncorrectHeaders.xls");
LogImporter.Import(LogFolder + "Logs_IncorrectHeaders.xls").ToList();
}
[Test]
@@ -24,7 +24,6 @@ namespace Web.Tests.ViewModels.CreateLog
};
}
// TODO: probably no longer need getlog
[Test]
public void GetLog_Correct()
{
@@ -32,7 +31,8 @@ namespace Web.Tests.ViewModels.CreateLog
var log = vm.GetLog();
Assert.That(log.CityName, Is.EqualTo(vm.CityName));
Assert.That(log.Date, Is.EqualTo(new DateTime(2010,10,20)));
Assert.That(log.Purpose.Purpose, Is.EqualTo("Training"));
// NOTE: Purpose is set elsewhere
//Assert.That(log.Purpose.Purpose, Is.EqualTo("Training"));
}
[Test]
@@ -44,15 +44,15 @@ namespace Web.Tests.ViewModels.CreateLog
vm.GetLog();
}
[Test]
[ExpectedException(typeof(AutoMapperMappingException))]
public void GetLog_Purpose_NotValid()
{
var vm = GetTestModel();
vm.Purpose = "uh huh nope";
var log = vm.GetLog();
Assert.That(log.CityName, Is.EqualTo(vm.CityName));
Assert.That(log.Date, Is.EqualTo(new DateTime(2010, 10, 20)));
}
//[Test]
//[ExpectedException(typeof(AutoMapperMappingException))]
//public void GetLog_Purpose_NotValid()
//{
// var vm = GetTestModel();
// vm.Purpose = "uh huh nope";
// var log = vm.GetLog();
// Assert.That(log.CityName, Is.EqualTo(vm.CityName));
// Assert.That(log.Date, Is.EqualTo(new DateTime(2010, 10, 20)));
//}
}
}