Akka.Remote.Tests.EndpointRegistrySpec.EndpointRegistry_must_be_able_to_register_writable_and_readonly_endpoint_correctly C# (CSharp) Method

EndpointRegistry_must_be_able_to_register_writable_and_readonly_endpoint_correctly() private method

        public void EndpointRegistry_must_be_able_to_register_writable_and_readonly_endpoint_correctly()
        {
            var reg = new EndpointRegistry();
            Assert.Null(reg.ReadOnlyEndpointFor(address1));
            Assert.Null(reg.WritableEndpointWithPolicyFor(address1));

            Assert.Equal(actorA, reg.RegisterReadOnlyEndpoint(address1, actorA, 1));
            Assert.Equal(actorB, reg.RegisterWritableEndpoint(address1, actorB, null,null));

            Assert.Equal(Tuple.Create(actorA,1), reg.ReadOnlyEndpointFor(address1));
            Assert.Equal(actorB, reg.WritableEndpointWithPolicyFor(address1).AsInstanceOf<EndpointManager.Pass>().Endpoint);

            Assert.False(reg.IsWritable(actorA));
            Assert.True(reg.IsWritable(actorB));

            Assert.True(reg.IsReadOnly(actorA));
            Assert.False(reg.IsReadOnly(actorB));
        }