예제 #1
0
        public void GetAverage_GetAverageUsingMachineId_ReturnTrue()
        {
            Machine machine = new Machine()
            {
                MachineId   = "IDX147",
                MachineName = "Machine147"
            };
            MachineManager machineMgr = new MachineManager();

            machineMgr.CreateMachine(machine: machine);
            machineMgr.AddUnits(120, machine.MachineId);
            machineMgr.AddUnits(150, machine.MachineId);
            int?avg = machineMgr.GetAverage(machine.MachineId);

            Assert.IsTrue(avg != null && avg == 135);
        }