public void UpdateMeatBiomassEmptyArray() { MultiMeshMeat MMM = new MultiMeshMeat(); MMM.UpdateMeatBiomass(); Assert.IsEqual(0.0f, MMM.GetMeatBiomassArray()[0], "Then it passes"); }
public void UpdateMeatBiomassOneElementArrayFractions() { float Y = 0.3f; MultiMeshMeat MMM = new MultiMeshMeat(); MultiMeshMeat.Meat meat = new MultiMeshMeat.Meat(); meat.meatSpatial = new Spatial(); meat.meatSpatial.Scale = new Vector3(Y, 0, 0); MMM.GetMeatArray().Add(meat); MMM.UpdateMeatBiomass(); Assert.IsEqual(0.3f, MMM.GetMeatBiomassArray()[0], "Then it passes"); }
public void UpdateMeatBiomassOneElementArrayWholeNumbers() { int Y = 1; MultiMeshMeat MMM = new MultiMeshMeat(); MultiMeshMeat.Meat meat = new MultiMeshMeat.Meat(); meat.meatSpatial = new Spatial(); meat.meatSpatial.Scale = new Vector3(Y, 0, 0); MMM.GetMeatArray().Add(meat); MMM.UpdateMeatBiomass(); Assert.IsEqual(1f, MMM.GetMeatBiomassArray()[0], "Then it passes"); }
public void UpdateMeatBiomassMultiElementArrayFractions() { int X = 3; float Y = 0.3f; float Z = 0.3f + 0.3f + 0.3f; MultiMeshMeat MMM = new MultiMeshMeat(); for (int i = 0; i < X; i++) { MultiMeshMeat.Meat meat = new MultiMeshMeat.Meat(); meat.meatSpatial = new Spatial(); meat.meatSpatial.Scale = new Vector3(Y, 0, 0); MMM.GetMeatArray().Add(meat); } MMM.UpdateMeatBiomass(); Assert.IsEqual(Z, MMM.GetMeatBiomassArray()[0], "Then it passes"); }