public void Name_SetNullValue_ThrowsArgumentNullException() { var terrariaNpc = new Terraria.NPC(); var npc = new OrionNpc(terrariaNpc); Assert.Throws <ArgumentNullException>(() => npc.Name = null !); }
public void MaxHealth_Get() { var terrariaNpc = new Terraria.NPC { lifeMax = 200 }; var npc = new OrionNpc(terrariaNpc); Assert.Equal(200, npc.MaxHealth); }
public void Health_Set() { var terrariaNpc = new Terraria.NPC(); var npc = new OrionNpc(terrariaNpc); npc.Health = 100; Assert.Equal(100, terrariaNpc.life); }
public void Health_Get() { var terrariaNpc = new Terraria.NPC { life = 100 }; var npc = new OrionNpc(terrariaNpc); Assert.Equal(100, npc.Health); }
public void Id_Get() { var terrariaNpc = new Terraria.NPC { netID = (int)NpcId.BlueSlime }; var npc = new OrionNpc(terrariaNpc); Assert.Equal(NpcId.BlueSlime, npc.Id); }
public void Name_Set() { var terrariaNpc = new Terraria.NPC(); var npc = new OrionNpc(terrariaNpc); npc.Name = "test"; Assert.Equal("test", terrariaNpc.GivenOrTypeName); }
public void Name_Get() { var terrariaNpc = new Terraria.NPC { _givenName = "test" }; var npc = new OrionNpc(terrariaNpc); Assert.Equal("test", npc.Name); }
public void SetId() { var terrariaNpc = new Terraria.NPC(); var npc = new OrionNpc(terrariaNpc); npc.SetId(NpcId.BlueSlime); Assert.Equal(NpcId.BlueSlime, (NpcId)terrariaNpc.netID); }
public void MaxHealth_Set() { var terrariaNpc = new Terraria.NPC(); var npc = new OrionNpc(terrariaNpc); npc.MaxHealth = 200; Assert.Equal(200, terrariaNpc.lifeMax); }
public void AiValues_Set() { var terrariaNpc = new Terraria.NPC(); var npc = new OrionNpc(terrariaNpc); npc.AiValues[0] = 1f; npc.AiValues[1] = 2f; npc.AiValues[2] = 3f; npc.AiValues[3] = 4f; Assert.Equal(1f, terrariaNpc.ai[0]); Assert.Equal(2f, terrariaNpc.ai[1]); Assert.Equal(3f, terrariaNpc.ai[2]); Assert.Equal(4f, terrariaNpc.ai[3]); }