public async Task CreateAnchorSet() { AnchorSetService anchorSetService = new AnchorSetService(new TestDatabaseHandler <AnchorSet>()); string anchorSetName = "testanchorset"; AnchorSet anchorSet = await anchorSetService.CreateAnchorSet(anchorSetName); Assert.IsNotNull(anchorSet); Assert.AreEqual(anchorSet.Name, anchorSetName); }
public async Task CreateVirtualAnchor() { AnchorSetService anchorSetService = new AnchorSetService(new TestDatabaseHandler <AnchorSet>()); string anchorSetName = "anchorSetId"; AnchorSet anchorSet = await anchorSetService.CreateAnchorSet(anchorSetName); AnchorSet newAnchorSet = await anchorSetService.CreateVirtualAnchor(anchorSet.Id, "anchorId"); newAnchorSet.Anchors.Should().HaveCount(1); }
public async Task CanGetPhysicalAnchorSetWithNoAnchors() { AnchorSetService anchorSetService = new AnchorSetService(new TestDatabaseHandler <AnchorSet>()); AnchorSet anchorSet = await anchorSetService.CreateAnchorSet("anchorSetId"); anchorSet = await anchorSetService.GetPhysicalAnchorSet(anchorSet.Id); anchorSet.Anchors.Should().NotBeNull(); anchorSet.Anchors.Should().BeEmpty(); }
public async Task ThereCanBeManyPhysicalAnchors() { AnchorSetService anchorSetService = new AnchorSetService(new TestDatabaseHandler <AnchorSet>()); string anchorSetName = "anchorSetId"; AnchorSet anchorSet = await anchorSetService.CreateAnchorSet(anchorSetName); AnchorSet newAnchorSet = await anchorSetService.CreatePhsyicalAnchor(anchorSet.Id, "anchorId", "deviceId1"); newAnchorSet = await anchorSetService.CreatePhsyicalAnchor(anchorSet.Id, "anchorId2", "deviceId2"); newAnchorSet = await anchorSetService.CreatePhsyicalAnchor(anchorSet.Id, "anchorId3", "deviceId3"); newAnchorSet.Anchors.Should().HaveCount(3); }
public async Task CanRemoveAndAddAnchor() { AnchorSetService anchorSetService = new AnchorSetService(new TestDatabaseHandler <AnchorSet>()); string anchorSetName = "anchorSetId"; AnchorSet anchorSet = await anchorSetService.CreateAnchorSet(anchorSetName); AnchorSet newAnchorSet = await anchorSetService.CreatePhsyicalAnchor(anchorSet.Id, "anchorId", "deviceId1"); newAnchorSet = await anchorSetService.CreatePhsyicalAnchor(anchorSet.Id, "anchorId2", "deviceId2"); newAnchorSet = await anchorSetService.CreatePhsyicalAnchor(anchorSet.Id, "anchorId2", "deviceId3"); newAnchorSet.Anchors.Should().HaveCount(2); newAnchorSet.Anchors[1].DeviceId.Should().Be("deviceId3"); }
public async Task CreateVirtualAnchorWithNoAnchorSetThrowsException() { AnchorSetService anchorSetService = new AnchorSetService(new TestDatabaseHandler <AnchorSet>()); AnchorSet anchorSet = await anchorSetService.CreateVirtualAnchor("anchorSetId", "anchorId"); }