public void Test4AssignSkinUseFrames() { Skin testSkin = new Skin(); testSkin.UseFrames = true; Assert.AreEqual(testSkin.UseFrames, true); }
public void Test3AssignSkinName() { Skin testSkin = new Skin(); testSkin.Name = "Test Name"; Assert.AreEqual(testSkin.Name, "Test Name"); }
public void Test2AssignSkinDescription() { Skin testSkin = new Skin(); testSkin.Description = "Test Description"; Assert.AreEqual(testSkin.Description, "Test Description"); }
public void Test1CreateSkinClassTest() { Skin testSkin = new Skin(); Assert.IsNotNull(testSkin, "Skin object created."); }
public void Test5CreateSkinWithInitialValues() { Skin testSkin = new Skin("Test Name", "Test Description", true); Assert.AreEqual(testSkin.Name, "Test Name"); Assert.AreEqual(testSkin.Description, "Test Description"); Assert.AreEqual(testSkin.UseFrames, true); }
public void Test6CreateSkinFromSkin() { Skin testSkin1 = new Skin("Test Name", "Test Description", true); Skin testSkin2 = new Skin(testSkin1); Assert.AreEqual(testSkin2.Name, "Test Name"); Assert.AreEqual(testSkin2.Description, "Test Description"); Assert.AreEqual(testSkin2.UseFrames, true); }
/// <summary> /// Adds a new skin object to the skin list /// </summary> /// <param name="skinName">Name of the skin</param> /// <param name="skinDescription">Description for the skin</param> /// <param name="useFrames">whether the skin uses frames</param> public void AddSkin(string skinName, string skinDescription, bool useFrames) { var newskin = new Skin(skinName, skinDescription, useFrames); string keyName = skinName.ToUpper(); if (!_skins.ContainsKey(keyName)) { _skins.Add(keyName, newskin); } }
/// <summary> /// Constructor from another skin object /// </summary> /// <param name="other">The other skin to create the new skin from</param> public Skin(Skin other) { Name = other.Name; Description = other.Description; UseFrames = other.UseFrames; }