コード例 #1
0
ファイル: Lenovo.cs プロジェクト: Elinos/TelerikAcademy
 public override Server CreateServer()
 {
     var serverRam = new RAM(8);
     var cpu = new Cpu128Bit(2);
     var hardDrivesList = new List<HardDrive> { new HardDrive(0, true, 2, new List<HardDrive> { new HardDrive(500, false, 0), new HardDrive(500, false, 0) }) };
     var server = new Server(cpu, serverRam, hardDrivesList);
     return server;
 }
コード例 #2
0
 public void Test128BitCpu()
 {
     var test128BitCpu = new Cpu128Bit(2);
     var expectedLowNumber = "Number too low.";
     var expectedHighNumber = "Number too high.";
     var expectedResult = "Square of 2000 is 4000000.";
     Assert.AreEqual(expectedLowNumber, test128BitCpu.SquareNumber(-1));
     Assert.AreEqual(expectedHighNumber, test128BitCpu.SquareNumber(2001));
     Assert.AreEqual(expectedResult, test128BitCpu.SquareNumber(2000));
 }