Esempio n. 1
0
        public void AddData_WhenNotRecognized_ShouldThrow()
        {
            //Arrange
            var line = "008ç2345675434544345çJose da SilvaçRural";
            var lot  = new SalesProcessor.Domain.Lot.Lot(_configuration.Object, "Test");

            //Act
            Assert.ThrowsAny <System.Exception>(() => lot.AddData(line));
        }
Esempio n. 2
0
        public void AddData_WhenCustomer_ShouldAddCustomer()
        {
            //Arrange
            var line = "002ç2345675434544345çJose da SilvaçRural";
            var lot  = new SalesProcessor.Domain.Lot.Lot(_configuration.Object, "Test");

            //Act
            lot.AddData(line);

            //Assert
            Assert.NotEmpty(lot.customers);
        }
Esempio n. 3
0
        public void AddData_WhenSalesperson_ShouldAddSalesperson()
        {
            //Arrange
            var line = "001ç1234567891234çPedroç50000";
            var lot  = new SalesProcessor.Domain.Lot.Lot(_configuration.Object, "Test");

            //Act
            lot.AddData(line);

            //Assert
            Assert.NotEmpty(lot.salespersons);
        }
Esempio n. 4
0
        public void AddData_WhenSales_ShouldAddSale()
        {
            //Arrange
            var line = "003ç10ç[1-10-100,2-30-2.50,3-40-3.10]çPedro ";
            var lot  = new SalesProcessor.Domain.Lot.Lot(_configuration.Object, "Test");

            //Act
            lot.AddData(line);

            //Assert
            Assert.NotEmpty(lot.sales);
        }