Esempio n. 1
0
        public void DeleteWorkOrder_ExpectedBehaviour_WorkOrderRemoved()
        {
            // Arrange
            WorkOrder item           = MakeTestWorkOrder();
            var       workOrdersRepo = new WorkOrdersRepo();
            // Act
            var       result    = workOrdersRepo.Remove(item.WoNumber);
            WorkOrder retrieved = workOrdersRepo.GetById(item.WoNumber);

            // Assert
            Assert.AreEqual(result, 1);
            Assert.AreEqual(retrieved, null);
        }
Esempio n. 2
0
        public void GetWorkOrder_ExpectedBehavior_ReturnsTestWorkOrder()
        {
            // Arrange
            WorkOrder item           = MakeTestWorkOrder();
            var       workOrdersRepo = new WorkOrdersRepo();

            // Act
            WorkOrder retrieved = workOrdersRepo.GetById(item.WoNumber);

            // Assert
            Assert.AreEqual(retrieved.AssemblyNumber, item.AssemblyNumber);
            Assert.AreEqual(retrieved.Customer, item.Customer);
            Assert.AreEqual(retrieved.CustomerPO, item.CustomerPO);
            Assert.AreEqual(retrieved.DueDate, item.DueDate);
            Assert.AreEqual(retrieved.QuantityToBuild, item.QuantityToBuild);
            Assert.AreEqual(retrieved.SalesOrder, item.SalesOrder);
            Assert.AreEqual(retrieved.SalesOrderLineItemNo, item.SalesOrderLineItemNo);
            Assert.AreEqual(retrieved.WoNumber, item.WoNumber);
            Assert.AreEqual(retrieved.WoStatus, item.WoStatus);
        }