Example #1
0
 private Area CreateTestEntry(out string name, out string picture)
 {
     name    = MockHelpers.GetRandomTestName();
     picture = "/test/Picture.png";
     return(Area.CreateUnmodified(name, picture));
 }
Example #2
0
        public void NewAreaHasPendingChanges()
        {
            var testEntry = new Area(MockHelpers.GetRandomTestName());

            Assert.IsTrue(testEntry.HasPendingChanges);
        }
Example #3
0
        public void NewAreaIsUntracked()
        {
            var testEntry = new Area(MockHelpers.GetRandomTestName());

            Assert.False(testEntry.IsTracked);
        }
Example #4
0
        public void NewZoneHasPendingChanges()
        {
            var testEntry = new Zone(MockHelpers.GetRandomTestName(), 20, 30, 5);

            Assert.IsTrue(testEntry.HasPendingChanges);
        }
Example #5
0
        public void NewZoneIsUntracked()
        {
            var testEntry = new Zone(MockHelpers.GetRandomTestName(), 20, 30, 5);

            Assert.IsFalse(testEntry.IsTracked);
        }
Example #6
0
        public void SetNewIconThrows()
        {
            var testEntry = this.CreateTestEntry(out _, out _, out var _, out _, out _);

            Assert.Throws <InvalidOperationException>(() => testEntry.Icon = MockHelpers.GetRandomTestName());
        }
Example #7
0
 private User CreateTestEntry(out string name)
 {
     name = MockHelpers.GetRandomTestName();
     return(User.CreateUnmodified("testId", name, false));
 }
Example #8
0
        public void NewPersonHasUserId()
        {
            var testEntry = new Person(MockHelpers.GetRandomTestName(), this.testUser);

            Assert.AreEqual(testEntry.UserId, this.testUser.Id);
        }
Example #9
0
        public void NewPersonIsUntracked()
        {
            var testEntry = new Person(MockHelpers.GetRandomTestName(), this.testUser);

            Assert.False(testEntry.IsTracked);
        }
Example #10
0
        public void NewPersonIsStorageEntry()
        {
            var testEntry = new Person(MockHelpers.GetRandomTestName(), this.testUser);

            Assert.IsTrue(testEntry.IsStorageEntry);
        }
Example #11
0
        public void NewPersonHasPendingChanges()
        {
            var testEntry = new Person(MockHelpers.GetRandomTestName(), this.testUser);

            Assert.IsTrue(testEntry.HasPendingChanges);
        }
Example #12
0
 private Person CreateTestEntry(out string entityId, out string name, out User user, out string picture, out IEnumerable <string> deviceTrackers)
 {
     entityId       = MockHelpers.GetRandomEntityId(KnownDomains.Person);
     name           = MockHelpers.GetRandomTestName();
     user           = User.CreateUnmodified(MockHelpers.GetRandomTestName(), name, false);
     picture        = "/test/Picture.png";
     deviceTrackers = new[] { MockHelpers.GetRandomEntityId(KnownDomains.DeviceTracker), MockHelpers.GetRandomEntityId(KnownDomains.DeviceTracker) };
     return(Person.CreateUnmodified(entityId, name, user.Id, picture, deviceTrackers));
 }