Exemplo n.º 1
0
        public void CalculatePrice_SomeComponentsAdded_ShouldReturnSumPriceOfAllComponents()
        {
            //Arrange
            DefaultConfiguration
            .WithComponent(
                DomainObjectsCreator.CreateComponent(0, ComponentType.Motherboard).WithAveragePrice(100m))
            .WithComponent(
                DomainObjectsCreator.CreateComponent(1, ComponentType.PowerSupply).WithAveragePrice(200m))
            .WithComponent(
                DomainObjectsCreator.CreateComponent(2, ComponentType.SolidStateDrice).WithAveragePrice(350.5m));

            //Assert
            Assert.That(DefaultConfiguration.CalculatePrice(), Is.EqualTo(650.5m));
        }
Exemplo n.º 2
0
 public void Constructor_JustCreated_ShouldHaveZeroPrice()
 {
     Assert.That(DefaultConfiguration.CalculatePrice(), Is.EqualTo(0));
 }