using NUnit.Framework; using PkmnLibSharp.Library; using PkmnLibSharp.Library.GrowthRates; using PkmnLibSharp.Library.Items; using PkmnLibSharp.Library.Moves; namespace PkmnLibSharpTests.Library { public class PokemonLibraryTests { [Test] public void ConstructDestruct() { var settings = new LibrarySettings(100, 4, 4096); var species = new SpeciesLibrary(10); var moves = new MoveLibrary(10); var items = new ItemLibrary(10); var gr = new GrowthRateLibrary(10); var types = new TypeLibrary(10); var abilities = new AbilityLibrary(10); var natures = new NatureLibrary(10); var lib = new PokemonLibrary(settings, species, moves, items, gr, types, abilities, natures); lib.Dispose(); } [Test] public void GetSpeciesLibrary() { var settings = new LibrarySettings(100, 4, 4096); var species = new SpeciesLibrary(10); var moves = new MoveLibrary(10); var items = new ItemLibrary(10); var gr = new GrowthRateLibrary(10); var types = new TypeLibrary(10); var abilities = new AbilityLibrary(10); var natures = new NatureLibrary(10); var lib = new PokemonLibrary(settings, species, moves, items, gr, types, abilities, natures); var s = lib.SpeciesLibrary; Assert.AreEqual(species, s); lib.Dispose(); } [Test] public void GetLibrarySettings() { var settings = new LibrarySettings(100, 4, 4096); var species = new SpeciesLibrary(10); var moves = new MoveLibrary(10); var items = new ItemLibrary(10); var gr = new GrowthRateLibrary(10); var types = new TypeLibrary(10); var abilities = new AbilityLibrary(10); var natures = new NatureLibrary(10); var lib = new PokemonLibrary(settings, species, moves, items, gr, types, abilities, natures); var s = lib.Settings; Assert.AreEqual(settings, s); lib.Dispose(); } [Test] public void GetMoveLibrary() { var settings = new LibrarySettings(100, 4, 4096); var species = new SpeciesLibrary(10); var moves = new MoveLibrary(10); var items = new ItemLibrary(10); var gr = new GrowthRateLibrary(10); var types = new TypeLibrary(10); var abilities = new AbilityLibrary(10); var natures = new NatureLibrary(10); var lib = new PokemonLibrary(settings, species, moves, items, gr, types, abilities, natures); var m = lib.MoveLibrary; Assert.AreEqual(moves, m); lib.Dispose(); } [Test] public void GetItemLibrary() { var settings = new LibrarySettings(100, 4, 4096); var species = new SpeciesLibrary(10); var moves = new MoveLibrary(10); var items = new ItemLibrary(10); var gr = new GrowthRateLibrary(10); var types = new TypeLibrary(10); var abilities = new AbilityLibrary(10); var natures = new NatureLibrary(10); var lib = new PokemonLibrary(settings, species, moves, items, gr, types, abilities, natures); var i = lib.ItemLibrary; Assert.AreEqual(items, i); lib.Dispose(); } [Test] public void GetGrowthRateLibrary() { var settings = new LibrarySettings(100, 4, 4096); var species = new SpeciesLibrary(10); var moves = new MoveLibrary(10); var items = new ItemLibrary(10); var gr = new GrowthRateLibrary(10); var types = new TypeLibrary(10); var abilities = new AbilityLibrary(10); var natures = new NatureLibrary(10); var lib = new PokemonLibrary(settings, species, moves, items, gr, types, abilities, natures); var g = lib.GrowthRateLibrary; Assert.AreEqual(gr, g); lib.Dispose(); } [Test] public void GetTypeLibrary() { var settings = new LibrarySettings(100, 4, 4096); var species = new SpeciesLibrary(10); var moves = new MoveLibrary(10); var items = new ItemLibrary(10); var gr = new GrowthRateLibrary(10); var types = new TypeLibrary(10); var abilities = new AbilityLibrary(10); var natures = new NatureLibrary(10); var lib = new PokemonLibrary(settings, species, moves, items, gr, types, abilities, natures); var t = lib.TypeLibrary; Assert.AreEqual(types, t); lib.Dispose(); } [Test] public void GetNatureLibrary() { var settings = new LibrarySettings(100, 4, 4096); var species = new SpeciesLibrary(10); var moves = new MoveLibrary(10); var items = new ItemLibrary(10); var gr = new GrowthRateLibrary(10); var types = new TypeLibrary(10); var abilities = new AbilityLibrary(10); var natures = new NatureLibrary(10); var lib = new PokemonLibrary(settings, species, moves, items, gr, types, abilities, natures); var n = lib.NatureLibrary; Assert.AreEqual(natures, n); lib.Dispose(); } [Test] public void GetAbilityLibrary() { var settings = new LibrarySettings(100, 4, 4096); var species = new SpeciesLibrary(10); var moves = new MoveLibrary(10); var items = new ItemLibrary(10); var gr = new GrowthRateLibrary(10); var types = new TypeLibrary(10); var abilities = new AbilityLibrary(10); var natures = new NatureLibrary(10); var lib = new PokemonLibrary(settings, species, moves, items, gr, types, abilities, natures); var a = lib.AbilityLibrary; Assert.AreEqual(abilities, a); lib.Dispose(); } } }