public void SmartStandardPattern_Calculates_Correctly_With_24_By_24_Room()
        {
            IPattern standardPattern = new SmartStandardPattern();

            CalculatorResult result = standardPattern.Calculate(new Room(24, 24), new Tile(12, 12), .25);

            Assert.AreEqual(4, result.WholeTilesUsed);
            Assert.AreEqual(4, result.TotalCuts);
            Assert.AreEqual(.02, result.WastePercentage);
        }
        public void SmartStandardPattern_Calculates_Correctly_Using_Offcuts()
        {
            IPattern standardPattern = new SmartStandardPattern();

            CalculatorResult result = standardPattern.Calculate(new Room(16.25, 36.5), new Tile(12, 12), .25);

            Assert.AreEqual(4, result.WholeTilesUsed);
            Assert.AreEqual(2, result.TotalCuts);
            Assert.AreEqual(0, result.WastePercentage);
        }
Beispiel #3
0
 public void Can_Get_Name_From_SmartStandardPattern()
 {
     var pattern = new SmartStandardPattern();
     Assert.AreEqual("Smart Standard Pattern", pattern.Name);
 }