public bool Equals(Visitor other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return Equals(other.FirstName, FirstName) && Equals(other.LastName, LastName) && other.PasportNumber == PasportNumber /*&& Equals(other.ID, ID)*/; }
public Order(Visitor visitor, Cashier cashier, Film film, DateTime dateTime) { Visitor = visitor; Cashier = cashier; Film = film; DateOrder = dateTime; }
public Order(string id, Visitor visitor, Cashier cashier, Film film, DateTime dateTime) { ID = id; Visitor = visitor; Cashier = cashier; Film = film; DateOrder = dateTime; }
public void FileWriteVisitorsTest() { Visitor visitor1 = new Visitor("1", "A", "A", 1111); Visitor visitor2 = new Visitor("2", "B", "B", 1112); Visitor visitor3 = new Visitor("3", "C", "C", 1113); _fileIsWritten = _fileRepository.SaveAll(new List<Visitor> { visitor1, visitor2, visitor3 }.AsEnumerable()); Assert.IsTrue(_fileIsWritten); //Assert.That(_fileName, Is.StringEnding(@"\Visitors.txt")); //Assert.IsTrue(File.Exists(_fileName), "Expect file: " + _fileName); }
private Visitor NewVisitor() { Console.Clear(); Console.WriteLine("Enter your Name"); var firstName = Console.ReadLine(); Console.WriteLine("Enter your LastName"); var lastName = Console.ReadLine(); Console.WriteLine("Enter your pasport number"); var pasportNumber = ChoiseOperation(); if (pasportNumber == 0) { Console.WriteLine("Please, only digits"); NewVisitor(); } var visitor = new Visitor(firstName, lastName, pasportNumber); _cinema.CreateVisitor(visitor); return visitor; }