示例#1
0
        public void When_Subscribing_Multiple_Times_The_Same_Definition_Is_Returned(IEntityDirectory <string> root)
        {
            var snapshot1 = root.Changes.Snapshot().ToDebugStringList();
            var snapshot2 = root.Changes.Snapshot().ToDebugStringList();

            Assert.Equal(snapshot1, snapshot2);
        }
示例#2
0
        public void Mirroring_A_Directory_Is_Working_As_Expected(IEntityDirectory <string> root)
        {
            var mirror         = GetMirroredDirectory(root);
            var mirrorSnapshot = mirror.Changes.Snapshot().ToDebugStringList();
            var rootSnapshot   = root.Changes.Snapshot().ToDebugStringList();

            Assert.Equal(mirrorSnapshot, rootSnapshot);
        }
示例#3
0
        public static IEntityDirectory <string> GetMirroredDirectory(IEntityDirectory <string> directory)
        {
            var mirror = EntityDirectory <string> .Create();

            directory.Changes.Subscribe(mirror.Changes);

            return(mirror);
        }
示例#4
0
        public void Dynamic_Composed_Common_Directory_Has_Same_Snapshot_As_Undynamic_Composition()
        {
            IEntityDirectory <string> dynamicDir = GetDynamicCommonDirectory();

            Assert.Equal(
                EntityTest.GetCommonDirectoryHardcodedDebugString(),
                dynamicDir.Changes.Snapshot().ToDebugStringList());
        }
 internal EntityDirectoryDynamicActor(IEntityDirectory <TKey> directory, SyntaxOptions syntaxOptions) : base(directory, syntaxOptions)
 {
 }