public void SimpleJsonObjectTest()
        {
            var sanitisedObject = _sanitiser.SanitiseSnapshot(new
            {
                Key = "Value"
            });

            sanitisedObject.Should().BeEquivalentTo(new
            {
                Key = "Value"
            });
        }
示例#2
0
        public void MatchSnapshot(object snapshot, SnapshotId snapshotId)
        {
            var sanitisedSnapshot = _snapshotSanitiser.SanitiseSnapshot(snapshot);
            var result            = Snap(snapshotId, sanitisedSnapshot);

            _snapshotAsserter.AssertSnapshot(result);
        }
示例#3
0
        public SnapResult MatchChildSnapshot(object snapshot, string childSnapshotName)
        {
            var snapId            = _snapshotIdResolver.ResolveSnapshotId(childSnapshotName);
            var sanitisedSnapshot = _snapshotSanitiser.SanitiseSnapshot(snapshot);

            return(Snap(snapId, sanitisedSnapshot));
        }
示例#4
0
        public void MatchSnapshot(object snapshot, string partialSnapshotName)
        {
            var snapId            = _snapshotIdResolver.ResolveSnapshotId(partialSnapshotName);
            var sanitisedSnapshot = _snapshotSanitiser.SanitiseSnapshot(snapshot);

            var result = Snap(snapId, sanitisedSnapshot);

            _snapshotAsserter.AssertSnapshot(result);
        }
示例#5
0
        public SnapResult MatchSnapshot(object snapshot, SnapshotId snapshotId)
        {
            var sanitisedSnapshot = _snapshotSanitiser.SanitiseSnapshot(snapshot);

            return(Snap(snapshotId, sanitisedSnapshot));
        }