public void addnewobjTest() { int corect = 1; string name = "nikolas"; string price = "1"; string foto = "C:/Users/strike xXx/Desktop/mixaniki/018510-glossy-black-3d-button-icon-symbols-shapes-power-button.png"; string thesh = "A2"; string code = "100"; string avalable = "1"; Classlistvi dataretes = new Classlistvi(); dataretes.addnewobj(name, price, foto, thesh, avalable, code); dataretes.data(); for (int i = 0; i < dataretes.len; i++) { if (dataretes.table[i, 1] == name & dataretes.table[i, 2] == price & dataretes.table[i, 3] == foto & dataretes.table[i, 4] == thesh & dataretes.table[i, 5] == code & dataretes.table[i, 6] == avalable) { corect = 0; //dataretes.deleteitems(dataretes.table[i, 0]); break; } } dataretes.deleteitems(code); Assert.ReferenceEquals(0, corect); }
public void dataTest() { Classlistvi dataretes = new Classlistvi(); Assert.ReferenceEquals(1, dataretes.data()); }