Beispiel #1
0
		public void testBeerContainerType  ()
		{
			//SETUP
			Beer beer = new Beer ("Pilsner", 		Beer.CONTAINER_TYPE_BOTTLE);

			//ASSERTION
			Assert.AreEqual (Beer.CONTAINER_TYPE_BOTTLE, beer.containerType);
		}
Beispiel #2
0
		public void testDefaultCalories  ([Values (0, 100, 10000)] float a)
		{
			//SETUP
			Beer beer = new Beer ("Pilsner", 		Beer.CONTAINER_TYPE_BOTTLE);
			beer.calories = (uint)a;

			//ASSERTION
			Assert.AreEqual (a, beer.calories);
		}
Beispiel #3
0
		public void testNameSetFromSetter  ()
		{
			//SETUP
			Beer beer = new Beer ("Pilsner", 		Beer.CONTAINER_TYPE_BOTTLE);
			beer.name = "PilsnerNew";
			
			//ASSERTION
			Assert.AreEqual ("PilsnerNew", 			beer.name);
		}
Beispiel #4
0
		public void testNameSetFromConstructor  ()
		{
			//SETUP
			Beer beer = new Beer ("Pilsner", 		Beer.CONTAINER_TYPE_BOTTLE);
			
			//ASSERTION
			Assert.AreEqual ("Pilsner", 			beer.name);
		}
		// PUBLIC
		/// <summary>
		/// _dos the run demo.
		/// </summary>
		public void _doRunDemo() 
		{

			//HERE IN THE 'REGULAR' TREE OF OUR CODE WE WOULD BE MAKING OUR
			//	GAME AND 'USING' OUR CLASSES LIKE NORMAL, WHATEVER 
			//	TYPE THEY MIGHT BE

			//NOTHING SPECIAL HAPPENING HERE...
			Beer beer = new Beer ("Pilsner", Beer.CONTAINER_TYPE_BOTTLE);
			Debug.Log ("beer: " + beer.calories);

			//NOR HERE...
			Soda soda = new Soda ("GreenLightening");
			Debug.Log ("soda: " + soda.name);



		}