Ejemplo n.º 1
0
        public void L002()
        {
            // arrange
            var fixture  = new Fixture();
            var location = new Location();

            location.AddBatch(fixture.Create <int>(), fixture.Create <int>());

            // act
            var isEmpty = location.IsEmpty;

            // assert
            Assert.False(isEmpty);
        }
Ejemplo n.º 2
0
        public void L003()
        {
            // arrange
            var fixture  = new Fixture();
            var location = new Location();
            var batchId  = fixture.Create <int>();

            location.AddBatch(batchId, fixture.Create <int>());

            // act
            var containsBatch = location.ContainsBatch(batchId);

            // assert
            Assert.True(containsBatch);
        }
Ejemplo n.º 3
0
        public void L004()
        {
            // arrange
            var fixture    = new Fixture();
            var location   = new Location();
            var idOfBatch1 = fixture.Create <int>();
            var idOfBatch2 = idOfBatch1 + fixture.Create <int>();

            location.AddBatch(idOfBatch1, fixture.Create <int>());

            // act
            var containsBatch = location.ContainsBatch(idOfBatch2);

            // assert
            Assert.False(containsBatch);
        }
Ejemplo n.º 4
0
        public void L005()
        {
            // arrange
            var fixture   = new Fixture();
            var location  = new Location();
            var batchId   = fixture.Create <int>();
            var quantity1 = fixture.Create <int>();
            var quantity2 = fixture.Create <int>() + quantity1;

            location.AddBatch(batchId, quantity2);
            location.RemoveBatch(batchId, quantity1);

            // act
            var quantityOfBatch = location.QuantityOfBatch(batchId);

            // assert
            Assert.Equal(quantity2 - quantity1, quantityOfBatch);
        }
Ejemplo n.º 5
0
        public void L006()
        {
            // arrange
            var fixture      = new Fixture();
            var location     = new Location();
            var idOfBatchOne = fixture.Create <int>();
            var idOfBatchTwo = fixture.Create <int>();
            var quantity1    = fixture.Create <int>();
            var quantity2    = quantity1;

            location.AddBatch(idOfBatchOne, quantity2);
            location.RemoveBatch(idOfBatchOne, quantity1);

            // act
            var quantityOfBatch = location.QuantityOfBatch(idOfBatchTwo);

            // assert
            Assert.Equal(0, quantityOfBatch);
        }