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

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

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

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

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

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

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

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

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

            Assert.IsTrue(testEntry.HasPendingChanges);
        }
예제 #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));
 }