public void ShouldRetrunTrueWhenVariablesAreEquals() { string model = "Fiat"; string owner = "Andrzej Miodek"; string mark = "126p"; string description = "Wymiana zderzaka"; List<Part> parts = new List<Part>() { new Part("Uszczelka", 40), new Part("Kierownica", 400), new Part("Opona", 600) }; Request a = new Request(model, owner, mark, description, parts, true); Request b = new Request(model, owner, mark, description, parts, true); Assert.IsTrue(a.Equals(b)); }
public void ShouldReturnFalseWhenListIsNotEqual() { string model = "Fiat"; string owner = "Andrzej Miodek"; string mark = "126p"; string description = "Wymiana zderzaka"; List<Part> parts = new List<Part>() { new Part("Uszczelka", 40), new Part("Kierownica", 400), new Part("Opona", 600) }; List<Part> parts2 = new List<Part>() { new Part("Uszczelka", 40), new Part("Lampa przednia", 270), new Part("Opona", 600) }; Request a = new Request(model, owner, mark, description, parts, true); Request b = new Request(model, owner, mark, description, parts2, true); Assert.IsFalse(a.Equals(b)); }