本文整理汇总了C#中Manager.Add方法的典型用法代码示例。如果您正苦于以下问题:C# Manager.Add方法的具体用法?C# Manager.Add怎么用?C# Manager.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Manager
的用法示例。
在下文中一共展示了Manager.Add方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestManagerCouldGetEmptyBoxCountGivenManagerStoreBoxIntoCabinet
public void TestManagerCouldGetEmptyBoxCountGivenManagerStoreBoxIntoCabinet()
{
var manager = new Manager();
var cabinet1 = new Cabinet(10);
var cabinet2 = new Cabinet(10);
manager.Add(cabinet1);
manager.Add(cabinet2);
manager.Store(new Bag(), false);
Assert.AreEqual(19,manager.GetEmptyBoxCount());
}
示例2: Should_hold_cabinet
public void Should_hold_cabinet()
{
var mgr = new Manager();
var cabinet = new Cabinet(1);
mgr.Add(cabinet);
Assert.IsTrue(mgr.HasEmptyBox());
}
示例3: Should_store_bag_when_has_empty_cabinet
public void Should_store_bag_when_has_empty_cabinet()
{
var mgr = new Manager();
var cabinet = new Cabinet(1);
var bag = new Bag();
mgr.Add(cabinet);
mgr.Store(bag);
Assert.IsFalse(mgr.HasEmptyBox());
}
示例4: TestManagerCouldPickBoxStoredFromManagerGivenManagerStoreBoxIntoCabinet
public void TestManagerCouldPickBoxStoredFromManagerGivenManagerStoreBoxIntoCabinet()
{
var manager = new Manager();
var cabinet = new Cabinet();
manager.Add(cabinet);
var bag = new Bag();
var ticket = manager.Store(bag, false);
var returnBag = manager.PickBag(ticket, false);
Assert.AreEqual(bag, returnBag);
}
示例5: TestManagerCouldStoreBoxGivenManagerHasOneRobotAndOneCabinet
public void TestManagerCouldStoreBoxGivenManagerHasOneRobotAndOneCabinet()
{
var manager = new Manager();
var robot = new Robot();
var cabinet = new Cabinet();
robot.Add(cabinet);
manager.Add(robot);
var ticket = manager.Store(new Bag(), true);
Assert.IsNotNull(ticket);
}
示例6: TestManagerShouldHaveEmptyBoxGivenManagerHasOneCabinet
public void TestManagerShouldHaveEmptyBoxGivenManagerHasOneCabinet()
{
var manager = new Manager();
manager.Add(new Cabinet());
Assert.IsTrue(manager.HasEmptyBox());
}
示例7: TestManagerShouldHaveEmptyBoxGivenManagerHasOneRobotAndOneCabinet
public void TestManagerShouldHaveEmptyBoxGivenManagerHasOneRobotAndOneCabinet()
{
var manager = new Manager();
var robot = new Robot();
var cabinet = new Cabinet();
robot.Add(cabinet);
manager.Add(robot);
Assert.IsTrue(manager.HasEmptyBox());
}