Ejemplo n.º 1
0
        public void TotalStorage_0_Users()
        {
            A.CallTo(() => _pcRep.GetAllUserPCs(A <int> .Ignored)).Returns(
                new List <PC> ()
                );

            var pcService = new PCService(_pcRep);

            Assert.AreEqual(0, pcService.GetTotalStorage(1));
        }
Ejemplo n.º 2
0
        public void TotalStorage_1_User_100_GB()
        {
            var userPcs = new List <PC>();

            userPcs.Add(new PC {
                GB_Storage = 100
            });

            A.CallTo(() => _pcRep.GetAllUserPCs(A <int> .Ignored)).Returns(
                userPcs
                );

            var pcService = new PCService(_pcRep);

            Assert.AreEqual(100, pcService.GetTotalStorage(1));
        }