Ejemplo n.º 1
0
        public void Organisation_Constructor()
        {
            var createdDateTime = DateTime.UtcNow;

            var testOrganisation = new Organisation(
                FakeObjects.TestUserWithId(),
                FakeValues.Name,
                FakeValues.Description,
                FakeValues.Website,
                null,
                createdDateTime);

            Assert.AreEqual(testOrganisation.Name, FakeValues.Name);
            Assert.AreEqual(testOrganisation.Description, FakeValues.Description);
            Assert.AreEqual(testOrganisation.Website, FakeValues.Website);
            Assert.AreEqual(testOrganisation.CreatedDateTime, createdDateTime);
        }
Ejemplo n.º 2
0
        public void ObservationNote_UpdateDetails()
        {
            var createdDateTime = DateTime.UtcNow;

            var testOrganisation = new Organisation(
                FakeObjects.TestUserWithId(),
                FakeValues.Name,
                FakeValues.Description,
                FakeValues.Website,
                null,
                createdDateTime);

            testOrganisation.UpdateDetails(
                FakeObjects.TestUser(),
                FakeValues.Name.AppendWith(additionalString),
                FakeValues.Description.AppendWith(additionalString),
                FakeValues.Website.AppendWith(additionalString),
                null);

            Assert.AreEqual(testOrganisation.Name, FakeValues.Name.AppendWith(additionalString));
            Assert.AreEqual(testOrganisation.Description, FakeValues.Description.AppendWith(additionalString));
            Assert.AreEqual(testOrganisation.Website, FakeValues.Website.AppendWith(additionalString));
            Assert.AreEqual(testOrganisation.CreatedDateTime, createdDateTime);
        }