public void ToString2__OK() { // arrange var testname = " Hans Solo "; var x = new Fullname(testname); // assert Assert.IsTrue(x.ToString() == testname); }
public string toInsert() { StringBuilder list = new StringBuilder(); list.Append("'" + Code + "',"); list.Append("'" + Fullname.ToString() + "',"); list.Append(((int)Gender).ToString() + ","); list.Append(((int)Lang).ToString() + ","); list.Append(((int)Cityzone).ToString() + ","); list.Append(((int)Employeetype).ToString() + ","); list.Append("'" + Username.ToString() + "',"); list.Append("'" + Password.ToString() + "',"); list.Append("'" + Pic.ToString() + "'"); return(list.ToString()); }
public string toUpdate() { StringBuilder list = new StringBuilder(); list.Append("code = '" + Code + "',"); list.Append("fullname = '" + Fullname.ToString() + "', "); list.Append("gender = " + ((int)Gender).ToString() + ", "); list.Append("lang = " + ((int)Lang).ToString() + ", "); list.Append("cityzone = " + ((int)Cityzone).ToString() + ", "); list.Append("type = " + ((int)Employeetype).ToString() + ", "); list.Append("username = '******', "); list.Append("[password] = '" + Password.ToString() + "', "); list.Append("pic = '" + Pic.ToString() + "'"); return(list.ToString()); }
public void FullnameValueObject_When_MultipleNamesPassed_AndSurname_ShouldCreateObject_And_HasProperString_InValueProperty() { string[] names = { "Michael", "Steven", "Jack" }; string surname = "Jordan"; var fullName = new Fullname(names, surname); string expected = $"{string.Join(" ", names)} {surname}"; Assert.That(fullName.ToString(), Is.EqualTo(expected)); }