public void SetUp() { _enemyBar = new Lair(); _agent = new Agent(); _dice = MockRepository.GenerateStub<IDice>(); _mission = new InfiltrationMission(_dice); Arrange(); }
static void Main(string[] args) { var agent = new Agent(); var lair = new Lair(); var dice = new Dice(m => new Random(DateTime.Now.Millisecond).Next(100)); var mission = new InfiltrationMission(dice); var timer = new MissionTimer(new LocatorImp()); timer.Subscribe(mission); //wire up the mission complete event mission.AsObservable<MissionOutcome>() .Subscribe(outcome => { Console.WriteLine("Mission complete"); mission.Begin(agent, lair); }); mission.Begin(agent, lair); Console.ReadLine(); }
private void AssertStartupBase(Lair lair) { Assert.IsNotNull(lair); Assert.AreEqual(lair.Name, _view.BaseName); Assert.AreEqual(lair.Location.Latitude, _latitude); Assert.AreEqual(lair.Location.Longitude, _longitude); //Assert.AreEqual(@base.Sections.Count(), Is.EqualTo(4)); //Assert.AreEqual(@base.Sections.Any(m => m.GetType() == typeof(BarSection)), Is.True, "No bar section found"); //Assert.AreEqual(@base.Sections.Where(m => m.GetType() == typeof(EmptySection)).Count(), Is.EqualTo(3), "Base should have 3 empty sections"); }
public void SetUp() { _bar = new Lair(); }
private static Lair CreateNewBar() { var lair = new Lair(); lair.SetProperty(m => m.Id, _lairId); return lair; }
public void SetUp() { _newLair = CreateNewBar(); _baseRepository = new InMemoryRepository<Lair>(_newLair); _controller = new LairController(Mapper.Engine, _baseRepository); }