public void GetItem_IfSKUNullOrEmpty__ShouldThrowArgumentNullException() { //arrange var orchestrator = new ItemOrchestrator(); //act Func <Item> action = () => { return(orchestrator.GetItem(null)); }; //assert action.Should().Throw <ArgumentNullException>(); }
public void GetItem_IfSKUExists__ShouldReturnItem() { //arrange var orchestrator = new ItemOrchestrator(); var expected = new Item { SKU = "A99", Price = 0.50m }; orchestrator._listItems.Add(expected); //act var item = orchestrator.GetItem("A99");; //assert item.Should().NotBeNull(); item.Should().Equals(expected); }