private Area CreateTestEntry(out string name, out string picture) { name = MockHelpers.GetRandomTestName(); picture = "/test/Picture.png"; return(Area.CreateUnmodified(name, picture)); }
public void NewAreaHasPendingChanges() { var testEntry = new Area(MockHelpers.GetRandomTestName()); Assert.IsTrue(testEntry.HasPendingChanges); }
public void NewAreaIsUntracked() { var testEntry = new Area(MockHelpers.GetRandomTestName()); Assert.False(testEntry.IsTracked); }
public void NewZoneHasPendingChanges() { var testEntry = new Zone(MockHelpers.GetRandomTestName(), 20, 30, 5); Assert.IsTrue(testEntry.HasPendingChanges); }
public void NewZoneIsUntracked() { var testEntry = new Zone(MockHelpers.GetRandomTestName(), 20, 30, 5); Assert.IsFalse(testEntry.IsTracked); }
public void SetNewIconThrows() { var testEntry = this.CreateTestEntry(out _, out _, out var _, out _, out _); Assert.Throws <InvalidOperationException>(() => testEntry.Icon = MockHelpers.GetRandomTestName()); }
private User CreateTestEntry(out string name) { name = MockHelpers.GetRandomTestName(); return(User.CreateUnmodified("testId", name, false)); }
public void NewPersonHasUserId() { var testEntry = new Person(MockHelpers.GetRandomTestName(), this.testUser); Assert.AreEqual(testEntry.UserId, this.testUser.Id); }
public void NewPersonIsUntracked() { var testEntry = new Person(MockHelpers.GetRandomTestName(), this.testUser); Assert.False(testEntry.IsTracked); }
public void NewPersonIsStorageEntry() { var testEntry = new Person(MockHelpers.GetRandomTestName(), this.testUser); Assert.IsTrue(testEntry.IsStorageEntry); }
public void NewPersonHasPendingChanges() { var testEntry = new Person(MockHelpers.GetRandomTestName(), this.testUser); Assert.IsTrue(testEntry.HasPendingChanges); }
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)); }