public void WhenReceivesParseableCorrectFormattedSpawnMobCommandCallsSpawnMob()
        {
            string msg = SpawnMobCommandBuilder.ADefaultSpawnMobCommand()
                         .Build();

            stubSp.SetExpectedForSpawnMobCall("default", 0f, 0f, 0);

            underTest.ResolveMessage(msg);

            Assert.IsTrue(stubSp.WasSpawnMobCalled());
        }
Example #2
0
        public void ParseSpawnMobCommand()
        {
            var expected = new SpawnMobCommand("knight", 0f, 0f, 0);
            var actual   = (SpawnMobCommand)underTest.Parse(
                SpawnMobCommandBuilder.ADefaultSpawnMobCommand()
                .WithObjectId("knight")
                .WithXPos(0f)
                .WithZPos(0f)
                .WithId(0)
                .Build());

            Assert.AreEqual(expected.GetObjectId(), actual.GetObjectId());
            Assert.AreEqual(expected.GetCommandType(), actual.GetCommandType());
            Assert.AreEqual(expected.GetXPos(), actual.GetXPos());
            Assert.AreEqual(expected.GetZPos(), actual.GetZPos());
            Assert.AreEqual(expected.GetId(), actual.GetId());
        }