public void ProductSerializationXMLTest() { Product product = new Product("Ibanez 200", 349.55); XMLConverter xmlc = new XMLConverter(); xmlc.writeObject(product, "product.txt"); Product secondClient = xmlc.readProduct("product.txt"); Assert.AreEqual(product.ToString(), secondClient.ToString()); }
public void TransactionSerializationXMLTest() { Transaction transaction = new Transaction(3, 3, "5 maja"); XMLConverter xmlc = new XMLConverter(); xmlc.writeObject(transaction, "transaction.txt"); Transaction secondClient = xmlc.readTransaction("transaction.txt"); Assert.AreEqual(transaction.ToString(), secondClient.ToString()); }
public void ClientSerializationXMLTest() { Client client = new Client("Tadeusz", "Nowak", "Random Street 23", "Lodz", 2005); XMLConverter xmlc = new XMLConverter(); xmlc.writeObject(client, "client.txt"); Client secondClient = xmlc.readClient("client.txt"); Assert.AreEqual(client.ToString(), secondClient.ToString()); }