-
Notifications
You must be signed in to change notification settings - Fork 511
Expand file tree
/
Copy pathStringTest.cs
More file actions
113 lines (112 loc) · 3.34 KB
/
Copy pathStringTest.cs
File metadata and controls
113 lines (112 loc) · 3.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using PokemonUnity;
using PokemonUnity.Monster;
using PokemonUnity.Attack;
using PokemonUnity.Character;
using PokemonUnity.Inventory;
using PokemonEssentials.Interface;
using PokemonEssentials.Interface.Battle;
using PokemonEssentials.Interface.Item;
using PokemonEssentials.Interface.Field;
using PokemonEssentials.Interface.Screen;
using PokemonEssentials.Interface.PokeBattle;
using PokemonEssentials.Interface.PokeBattle.Effects;
namespace Tests
{
[TestClass]
public class StringTest
{
[TestMethod]
public void Pokemon_DefaultName_Test()
{
Pokemon pokemon = new Pokemon(Pokemons.BULBASAUR, false);
Assert.AreEqual("BULBASAUR", pokemon.Name);
}
#region Nicknames
[TestMethod]
public void Pokemon_Nickname_Test()
{
//Name pokemon and confirm if name persist
Pokemon pokemon = new Pokemon(Pokemons.BULBASAUR, false);
string nick = "testname";
pokemon.SetNickname(nick);
Assert.AreEqual(nick, pokemon.Name);
}
[TestMethod]
public void Trainer_SetPokemon_Nickname()
{
//Assert.Inconclusive("Not implemented yet");
ITrainer trainer = new Trainer("Player",TrainerTypes.PLAYER);// { Party = new Pokemon[] { } };
//make sure pokemon is not egg, as eggs cannot be named
Pokemon pokemon = new Pokemon(Pokemons.ABRA, false);
if (pokemon.IsNicknamed) Assert.Fail("Already named");
string nick = "testname";
//Name pokemon and add to trainer party...
pokemon.SetNickname(nick);
//trainer.addPokemon(pokemon);
//trainer.Party[0].Name
Assert.AreEqual(nick, trainer.party[0].Name);
}
#endregion
[TestMethod]
public void Pokemon_Name_Test()
{
Assert.AreEqual("Bulbasaur", Pokemons.BULBASAUR.ToString(TextScripts.Name));
}
[TestMethod]
public void Pokemon_FlavorText_Test()
{
Assert.AreEqual("Bulbasaur", Pokemons.BULBASAUR.ToString(TextScripts.Description));
}
[TestMethod]
public void Move_Name_Test()
{
Assert.AreEqual("Absorb", Moves.ABSORB.ToString(TextScripts.Name));
}
[TestMethod]
public void Move_FlavorText_Test()
{
Assert.AreEqual("Absorb", Moves.ABSORB.ToString(TextScripts.Description));
}
[TestMethod]
public void Item_Name_Test()
{
Assert.AreEqual("Masterball", Items.MASTER_BALL.ToString(TextScripts.Name));
}
[TestMethod]
public void Item_FlavorText_Test()
{
Assert.AreEqual("Masterball", Items.MASTER_BALL.ToString(TextScripts.Description));
}
[TestMethod]
public void NPC_Name_Test()
{
Pokemon pokemon = new Pokemon(Pokemons.BULBASAUR);
//Assert.AreEqual("Bulbasaur", pokemon.Name);
Assert.Inconclusive("Not implemented yet");
}
//[TestMethod]
public void NPC_Script_Test()
{
Pokemon pokemon = new Pokemon(Pokemons.BULBASAUR);
//Assert.AreEqual("Bulbasaur", pokemon.Name);
Assert.Inconclusive("Not implemented yet");
}
//[TestMethod]
public void Script_Color_Test() //Unity thing...
{
Pokemon pokemon = new Pokemon(Pokemons.BULBASAUR);
//Assert.AreEqual("Bulbasaur", pokemon.Name);
Assert.Inconclusive("Not implemented yet");
}
//[TestMethod]
public void Dialog_Script_Insert_And_Replace_Test()
{
//Replace placeholder text with correct variable in string
Pokemon pokemon = new Pokemon(Pokemons.BULBASAUR);
//Assert.AreEqual("Bulbasaur", pokemon.Name);
Assert.Inconclusive("Not implemented yet");
}
}
}