Exemple #1
0
        public void Add_FailWithNonUTCDate()
        {
            var manager = new SurveyedSurfaceManager(StorageMutability.Mutable);

            var siteModelUid = Guid.NewGuid();
            var designUid    = Guid.NewGuid();

            Action act = () => manager.Add(siteModelUid, new DesignDescriptor(designUid, "", ""), DateTime.Now, BoundingWorldExtent3D.Null(), new SubGridTreeSubGridExistenceBitMask());

            act.Should().Throw <ArgumentException>().WithMessage("AsAtDate must be a UTC date time");
        }
Exemple #2
0
        public void Add()
        {
            var manager = new SurveyedSurfaceManager(StorageMutability.Mutable);

            var siteModelUid = Guid.NewGuid();
            var designUid    = Guid.NewGuid();
            var newSS        = manager.Add(siteModelUid, new DesignDescriptor(designUid, "", ""), DateTime.UtcNow, BoundingWorldExtent3D.Null(), new SubGridTreeSubGridExistenceBitMask());

            var results = manager.List(siteModelUid);

            results.Should().NotBeNull();
            results.Count.Should().Be(1);
            results[0].ID.Should().Be(designUid);
        }