diff --git a/src/Squire/Framework/LinqKihonStructure.cs b/src/Squire/Framework/LinqKihonStructure.cs index 8e4ffe7..8ab6161 100644 --- a/src/Squire/Framework/LinqKihonStructure.cs +++ b/src/Squire/Framework/LinqKihonStructure.cs @@ -68,6 +68,29 @@ public void Order_the_list_by_the_something_property_test() Assert.AreEqual(list[1], item.LastOrDefault()); } + + [TestMethod] + public void Order_the_list_by_the_something_property_descending_test() + { + //arrange + var product = new Product() { Something = 2 }; + var list = new List() + { + product, + new Product(){Something = 1} + }; + + + + //act + IEnumerable item = Order_the_list_by_the_something_property_descending(list); + + //assert + Assert.AreEqual(list[1], item.FirstOrDefault()); + Assert.AreEqual(list[0], item.LastOrDefault()); + } + + protected abstract IEnumerable Order_the_list_by_the_something_property_descending(List list); protected abstract IEnumerable Order_the_list_by_the_something_property(List list); protected abstract IEnumerable Filter_the_products_where_something_is_equal_to_2_from_list(List list); protected abstract IEnumerable Select_the_Something_property_from_list(List list); diff --git a/src/Squire/LinqKihon.cs b/src/Squire/LinqKihon.cs index dddd415..3635f0d 100644 --- a/src/Squire/LinqKihon.cs +++ b/src/Squire/LinqKihon.cs @@ -14,6 +14,11 @@ protected override IEnumerable Select_the_Something_property_from_list(List throw new NotImplementedException(); } + protected override IEnumerable Order_the_list_by_the_something_property_descending(List list) + { + throw new NotImplementedException(); + } + protected override IEnumerable Order_the_list_by_the_something_property(List list) { throw new NotImplementedException();