Exemple #1
0
        public void TestMethod1()
        {
            IScreen Screen = new ScreenNineP();
            Pc      pc     = new PcBuilder().WithScreen(Screen).Build();

            Assert.AreEqual(350.0f, pc.GetTotalPrice());
        }
Exemple #2
0
        public void should_return_the_total_computer_price_with_one_item()
        {
            IScreen screen = new ScreenNineP();
            PC      pc     = new PcBuilder().WithScreen(screen).Build();

            Assert.AreEqual(350.0f, pc.GetTotalPrice());
        }
Exemple #3
0
        public void should_return_the_total_computer_price_with_two_items()
        {
            IScreen    screen    = new ScreenNineP();
            IProcessor processor = new ProcessorI5();

            PC pc = new PcBuilder().WithScreen(screen).WithProcessor(processor).Build();

            Assert.AreEqual(750.0f, pc.GetTotalPrice());
        }
Exemple #4
0
        public void should_return_all_PC_component()
        {
            IScreen    screen    = new ScreenNineP();
            IProcessor processor = new ProcessorI5();
            IRamMemory ram       = new RamMemory12Go();

            PC pc = new PcBuilder()
                    .WithScreen(screen)
                    .WithProcessor(processor)
                    .WithRamMemory(ram)
                    .Build();

            Assert.AreEqual(screen.Size, pc.GetScreen().Size);
            Assert.AreEqual(processor.Type, pc.GetProcessor().Type);
            Assert.AreEqual(ram.Size, pc.GetRamMemory().Size);
        }