本文整理汇总了C#中Item.ShouldBeEquivalentTo方法的典型用法代码示例。如果您正苦于以下问题:C# Item.ShouldBeEquivalentTo方法的具体用法?C# Item.ShouldBeEquivalentTo怎么用?C# Item.ShouldBeEquivalentTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Item
的用法示例。
在下文中一共展示了Item.ShouldBeEquivalentTo方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BackstagePassShouldLoseQualityOnSellInDate
public void BackstagePassShouldLoseQualityOnSellInDate()
{
IList<Item> items = new List<Item> { new Item { Name = "Backstage passes to a TAFKAL80ETC concert", SellIn = 0, Quality = 5 } };
GildedRose app = new GildedRose(items);
app.UpdateQuality();
var expected = new Item { Name = "Backstage passes to a TAFKAL80ETC concert", SellIn = -1, Quality = 0 };
expected.ShouldBeEquivalentTo(items[0]);
}
示例2: AgedBrieShouldIncreaseInQualityTwiceAsFastAfterSellInDate
public void AgedBrieShouldIncreaseInQualityTwiceAsFastAfterSellInDate()
{
IList<Item> items = new List<Item> { new Item { Name = "Aged Brie", SellIn = 0, Quality = 5 } };
GildedRose app = new GildedRose(items);
app.UpdateQuality();
var expected = new Item { Name = "Aged Brie", SellIn = -1, Quality = 7 };
expected.ShouldBeEquivalentTo(items[0]);
}
示例3: BackstagePassShouldIncreaseInQualityTwiceAsFastWhenConcertIsApproaching
public void BackstagePassShouldIncreaseInQualityTwiceAsFastWhenConcertIsApproaching()
{
IList<Item> items = new List<Item> { new Item { Name = "Backstage passes to a TAFKAL80ETC concert", SellIn = 10, Quality = 5 } };
GildedRose app = new GildedRose(items);
app.UpdateQuality();
var expected = new Item { Name = "Backstage passes to a TAFKAL80ETC concert", SellIn = 9, Quality = 7 };
expected.ShouldBeEquivalentTo(items[0]);
}
示例4: ConjuredItemsShouldLoseQualityTwiceAsFast
public void ConjuredItemsShouldLoseQualityTwiceAsFast()
{
IList<Item> items = new List<Item> { new Item { Name = "Conjured foo", SellIn = 10, Quality = 5 } };
GildedRose app = new GildedRose(items);
app.UpdateQuality();
var expected = new Item { Name = "Conjured foo", SellIn = 9, Quality = 3 };
expected.ShouldBeEquivalentTo(items[0]);
}
示例5: SulfurasShouldNotChangeQuality
public void SulfurasShouldNotChangeQuality()
{
IList<Item> items = new List<Item> { new Item { Name = "Sulfuras, Hand of Ragnaros", SellIn = 10, Quality = 80 } };
GildedRose app = new GildedRose(items);
app.UpdateQuality();
var expected = new Item { Name = "Sulfuras, Hand of Ragnaros", SellIn = 10, Quality = 80 };
expected.ShouldBeEquivalentTo(items[0]);
}
示例6: ItemShouldNotIncreaseInQualityAbove50
public void ItemShouldNotIncreaseInQualityAbove50()
{
IList<Item> items = new List<Item> { new Item { Name = "Aged Brie", SellIn = 10, Quality = 50 }, new Item { Name = "Backstage passes to a TAFKAL80ETC concert", SellIn = 20, Quality = 50 } };
GildedRose app = new GildedRose(items);
app.UpdateQuality();
var brie = new Item { Name = "Aged Brie", SellIn = 9, Quality = 50 };
brie.ShouldBeEquivalentTo(items[0]);
var concert = new Item { Name = "Backstage passes to a TAFKAL80ETC concert", SellIn = 19, Quality = 50 };
concert.ShouldBeEquivalentTo(items[1]);
}
示例7: ItemShouldNeverDegradeBelowZero
public void ItemShouldNeverDegradeBelowZero()
{
IList<Item> items = new List<Item> { new Item { Name = "foo", SellIn = 0, Quality = 0 } };
GildedRose app = new GildedRose(items);
app.UpdateQuality();
var expected = new Item { Name = "foo", SellIn = -1, Quality = 0 };
expected.ShouldBeEquivalentTo(items[0]);
}
示例8: ItemShouldDegradeInQualityTwiceAsFastAfterTheSellInDate
public void ItemShouldDegradeInQualityTwiceAsFastAfterTheSellInDate()
{
IList<Item> items = new List<Item> { new Item { Name = "foo", SellIn = 0, Quality = 5 } };
GildedRose app = new GildedRose(items);
app.UpdateQuality();
var expected = new Item { Name = "foo", SellIn = -1, Quality = 3 };
expected.ShouldBeEquivalentTo(items[0]);
}
示例9: ItemShouldDegradeInQuality
public void ItemShouldDegradeInQuality()
{
IList<Item> items = new List<Item> { new Item { Name = "foo", SellIn = 10, Quality = 5 } };
GildedRose app = new GildedRose(items);
app.UpdateQuality();
var expected = new Item { Name = "foo", SellIn = 9, Quality = 4 };
expected.ShouldBeEquivalentTo(items[0]);
}