public void GeneratesACommissionForAgent() { var item = new Item { Id = 1, ItemType = ItemType.Book, Name = "someProduct" }; var rule = new BookRule(); var actual = rule.Apply(item); Assert.Contains("Commission payment generated for Agent", actual.Activity); }
public void GeneratesAPackageSlipForShipping() { var item = new Item { Id = 1, ItemType = ItemType.Book, Name = "someProduct" }; var rule = new BookRule(); var actual = rule.Apply(item); Assert.Contains("Duplicate Slip generated for Royalty Dept", actual.Activity); }
public void ApplicationReturnsARuleLog() { var item = new Item { Id = 1, ItemType = ItemType.Book, Name = "someProduct" }; var rule = new BookRule(); var actual = rule.Apply(item); Assert.IsType(typeof(RuleLog), actual); Assert.Equal("Book Rule", actual.RuleName); }
public void ApplysForBook() { var item = new Item { Id = 1, ItemType = ItemType.Book, Name = "someProduct" }; var rule = new BookRule(); var actual = rule.Apply(item); Assert.NotNull(actual); Assert.IsType(typeof(RuleLog), actual); }