public void TestGetCategoryId() { _factory.Categories.Add("birds"); int?id = new CommandBaseWrapper(_factory).GetEntityId(EntityType.Category, "birds"); Assert.IsNotNull(id); }
public void TestGetLocationId() { _factory.Locations.Add("somewhere", null, null, null, null, null, null, null); int?id = new CommandBaseWrapper(_factory).GetEntityId(EntityType.Location, "somewhere"); Assert.IsNotNull(id); }
public void TestGetWildcardCategoryId() { int?id = new CommandBaseWrapper(_factory).GetEntityId(EntityType.Category, "*"); Assert.IsNull(id); }
public void TestGetInvalidDate() { DateTime?date = new CommandBaseWrapper(_factory).GetDate("gibberish"); Assert.IsNull(date); }
public void TestGetDate() { DateTime?date = new CommandBaseWrapper(_factory).GetDate("2020-01-01"); Assert.AreEqual(new DateTime(2020, 1, 1), date); }