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); }
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); }
public static IEntityDirectory <string> GetMirroredDirectory(IEntityDirectory <string> directory) { var mirror = EntityDirectory <string> .Create(); directory.Changes.Subscribe(mirror.Changes); return(mirror); }
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) { }