Exemplo n.º 1
0
        public void Should_DeleteRow()
        {
            SupplierTenderQuantityTableItemJson supplierTenderQuantityTableItemJson = new SupplierTenderQuantityTableItemJson(new List <SupplierTenderQuantityTableItem>()
            {
                new SupplierTenderQuantityTableItem()
                {
                    Id = 1, ItemNumber = 1
                }
            });

            supplierTenderQuantityTableItemJson.DeleteRow(itemNumber);
            Assert.Empty(supplierTenderQuantityTableItemJson.SupplierTenderQuantityTableItems);
        }
Exemplo n.º 2
0
        public void Should_Update()
        {
            SupplierTenderQuantityTableItemJson supplierTenderQuantityTableItemJson = new SupplierTenderQuantityTableItemJson(new List <SupplierTenderQuantityTableItem>()
            {
                new SupplierTenderQuantityTableItem()
                {
                    Id = 1
                }
            });

            supplierTenderQuantityTableItemJson.Update();
            supplierTenderQuantityTableItemJson.ShouldNotBeNull();
        }
Exemplo n.º 3
0
        public void Should_Create()
        {
            SupplierTenderQuantityTableItemJson supplierTenderQuantityTableItemJson = new SupplierTenderQuantityTableItemJson(new List <SupplierTenderQuantityTableItem>()
            {
                new SupplierTenderQuantityTableItem()
                {
                    Id = 1
                }
            });

            supplierTenderQuantityTableItemJson.Create();
            Assert.Equal(ObjectState.Added, supplierTenderQuantityTableItemJson.State);
        }
Exemplo n.º 4
0
        public void Should_RemoveAlternative()
        {
            SupplierTenderQuantityTableItemJson supplierTenderQuantityTableItemJson = new SupplierTenderQuantityTableItemJson(new List <SupplierTenderQuantityTableItem>()
            {
                new SupplierTenderQuantityTableItem()
                {
                    Id = 1
                }
            });

            supplierTenderQuantityTableItemJson.RemoveAlternative();
            Assert.True(string.IsNullOrEmpty(supplierTenderQuantityTableItemJson.SupplierTenderQuantityTableItems[0].AlternativeValue));
        }
Exemplo n.º 5
0
        public void Should_UpadteSupplierQTableItemsAlternativeValue_Second()
        {
            SupplierTenderQuantityTableItemJson supplierTenderQuantityTableItemJson = new SupplierTenderQuantityTableItemJson(new List <SupplierTenderQuantityTableItem>()
            {
                new SupplierTenderQuantityTableItem()
                {
                    Id = 1
                }
            });

            supplierTenderQuantityTableItemJson.UpadteSupplierQTableItemsAlternativeValue(new List <SupplierTenderQuantityTableItem>()
            {
                new SupplierTenderQuantityTableItem()
                {
                    Id = 2
                }
            });
            supplierTenderQuantityTableItemJson.ShouldNotBeNull();
        }