public void It_can_get_and_set_Assistant() { // Act var testPerson = new Person { DisplayName = "Test Person" }; _it.Assistant = testPerson; // Assert Assert.AreEqual(testPerson.DisplayName, _it.Assistant.DisplayName); }
public void It_can_get_and_set_UserID() { // Act var testPerson = new Person { DisplayName = "Test Person" }; _it.UserID = testPerson; // Assert Assert.AreEqual(testPerson.DisplayName, _it.UserID.DisplayName); }
public void It_can_get_and_set_DisplayedOwner() { // Act var testPerson = new Person { DisplayName = "Test Person" }; _it.DisplayedOwner = testPerson; // Assert Assert.AreEqual(testPerson.DisplayName, _it.DisplayedOwner.DisplayName); }
public void It_has_UserID_which_can_be_set_back_to_null() { // Arrange var testPerson = new Person { DisplayName = "Test Person" }; _it.UserID = testPerson; // Act _it.UserID = null; // Assert Assert.IsNull(_it.UserID); }
public void It_has_a_constructor_that_takes_an_IdmResource_without_Creator() { var resource = new IdmResource { DisplayName = "My Display Name", }; var it = new Person(resource); Assert.AreEqual("My Display Name", it.DisplayName); Assert.IsNull(it.Creator); }
public void It_has_a_constructor_that_takes_an_IdmResource() { var resource = new IdmResource { DisplayName = "My Display Name", Creator = new Person { DisplayName = "Creator Display Name", ObjectID = "Creator ObjectID"}, }; var it = new Person(resource); Assert.AreEqual("Person", it.ObjectType); Assert.AreEqual("My Display Name", it.DisplayName); Assert.AreEqual("Creator Display Name", it.Creator.DisplayName); }
public PersonTests() { _it = new Person(); }
public void It_has_DisplayedOwner_which_can_be_set_back_to_null() { // Arrange var testPerson = new Person { DisplayName = "Test Person" }; _it.DisplayedOwner = testPerson; // Act _it.DisplayedOwner = null; // Assert Assert.IsNull(_it.DisplayedOwner); }
public void It_can_set_and_get_Creator() { var creator = new Person { CreatedTime = DateTime.Now, Description = "Test creator", DisplayName = "Joe User", ExpirationTime = DateTime.Now + TimeSpan.FromDays(1), MVObjectID = Guid.NewGuid().ToString("D"), ObjectID = Guid.NewGuid().ToString("D"), ObjectType = "Person", ResourceTime = DateTime.Now }; var it = new IdmResource(); it.Creator = creator; Assert.AreEqual("Test creator", it.Creator.Description); }