Ejemplo n.º 1
0
        public void GangWeaponsTest()
        {
            var gangId     = "1";
            var gangWeapon = new GangWeapon()
            {
                GangId = gangId,
                Weapon = new Weapon()
                {
                    WeaponId = (WeaponEnum)1
                },
                Cost = 10
            };

            Assert.AreEqual(0, _weaponManager.GetGangStash(gangId).Count());

            var returnedWeapon = _weaponManager.AddGangWeapon(gangWeapon);

            Assert.AreEqual("DDDD-EEEE-FFFF", returnedWeapon.GangWeaponId);
            Assert.AreEqual(1, _weaponManager.GetGangStash(gangId).Count());

            _weaponManager.RemoveGangWeapon("DDDD-EEEE-FFFF");
            Assert.AreEqual(0, _weaponManager.GetGangStash(gangId).Count());
        }
Ejemplo n.º 2
0
 public IEnumerable <Weapon> GetGangStash([FromUri] string gangId)
 {
     return(_weaponManager.GetGangStash(gangId).Select(gw => gw.Weapon));
 }