Ejemplo n.º 1
0
        public void Constructor_Default_AllValuesAreDefault()
        {
            ClientMetadata clientMetadata = new TestableClientMetadata();

            Assert.That(clientMetadata.AssemblyName, Is.EqualTo("Client"), "AssemblyName");
            Assert.That(clientMetadata.Name, Is.EqualTo("Client"), "Name");
            Assert.That(clientMetadata.InterfaceName, Is.EqualTo("IClient"), "InterfaceName");
            Assert.That(clientMetadata.Namespace, Is.EqualTo("Client"), "Namespace");
            Assert.That(clientMetadata.InformationalVersion, Is.EqualTo("1.0.0.0"), "InformationalVersion");
        }
Ejemplo n.º 2
0
        public void Constructor_Default_AllValuesAreDefault()
        {
            ClientMetadata clientMetadata = new TestableClientMetadata();

            Assert.That(clientMetadata.AssemblyName, Is.EqualTo("Client"), "AssemblyName");
            Assert.That(clientMetadata.Name, Is.EqualTo("Client"), "Name");
            Assert.That(clientMetadata.InterfaceName, Is.EqualTo("IClient"), "InterfaceName");
            Assert.That(clientMetadata.Namespace, Is.EqualTo("Client"), "Namespace");
            Assert.That(clientMetadata.InformationalVersion, Is.EqualTo("1.0.0.0"), "InformationalVersion");
        }
Ejemplo n.º 3
0
        public void Constructor_AssemblyNameAndClientName()
        {
            ClientMetadata clientMetadata = new TestableClientMetadata("My.Awesome.Client", "MyClient");

            Assert.That(clientMetadata.AssemblyName, Is.EqualTo("My.Awesome.Client"), "AssemblyName");
            Assert.That(clientMetadata.Name, Is.EqualTo("MyClient"), "Name");
            Assert.That(clientMetadata.InterfaceName, Is.EqualTo("IMyClient"), "InterfaceName");
            Assert.That(clientMetadata.Namespace, Is.EqualTo("My.Awesome.Client"), "Namespace");
            Assert.That(clientMetadata.InformationalVersion, Is.EqualTo("1.0.0.0"), "InformationalVersion");
        }
Ejemplo n.º 4
0
        public void Constructor_AssemblyNameAndClientName()
        {
            ClientMetadata clientMetadata = new TestableClientMetadata("My.Awesome.Client", "MyClient");

            Assert.That(clientMetadata.AssemblyName, Is.EqualTo("My.Awesome.Client"), "AssemblyName");
            Assert.That(clientMetadata.Name, Is.EqualTo("MyClient"), "Name");
            Assert.That(clientMetadata.InterfaceName, Is.EqualTo("IMyClient"), "InterfaceName");
            Assert.That(clientMetadata.Namespace, Is.EqualTo("My.Awesome.Client"), "Namespace");
            Assert.That(clientMetadata.InformationalVersion, Is.EqualTo("1.0.0.0"), "InformationalVersion");
        }
Ejemplo n.º 5
0
        public void With_ClientName()
        {
            var clientMetadata     = new TestableClientMetadata();
            var overriddenMetadata = clientMetadata.With(name: "MyAwesomeClient");

            Assert.That(overriddenMetadata.AssemblyName, Is.EqualTo("Client"), "AssemblyName");
            Assert.That(overriddenMetadata.Name, Is.EqualTo("MyAwesomeClient"), "Name");
            Assert.That(overriddenMetadata.InterfaceName, Is.EqualTo("IMyAwesomeClient"), "InterfaceName");
            Assert.That(overriddenMetadata.Namespace, Is.EqualTo("Client"), "Namespace");
            Assert.That(overriddenMetadata.InformationalVersion, Is.EqualTo("1.0.0.0"), "InformationalVersion");
        }
Ejemplo n.º 6
0
        public void With_AllValuesAreSet()
        {
            var clientMetadata     = new TestableClientMetadata();
            var overriddenMetadata = clientMetadata.With("My.Awesome.Client",
                                                         "MyClient",
                                                         "IMyClientInterace",
                                                         "My.Awesome.Client.Namespace",
                                                         "1.2.3.4");

            Assert.That(overriddenMetadata.AssemblyName, Is.EqualTo("My.Awesome.Client"), "AssemblyName");
            Assert.That(overriddenMetadata.Name, Is.EqualTo("MyClient"), "Name");
            Assert.That(overriddenMetadata.InterfaceName, Is.EqualTo("IMyClientInterace"), "InterfaceName");
            Assert.That(overriddenMetadata.Namespace, Is.EqualTo("My.Awesome.Client.Namespace"), "Namespace");
            Assert.That(overriddenMetadata.InformationalVersion, Is.EqualTo("1.2.3.4"), "InformationalVersion");
        }
Ejemplo n.º 7
0
        public void With_ClientName()
        {
            var clientMetadata = new TestableClientMetadata();
            var overriddenMetadata = clientMetadata.With(name : "MyAwesomeClient");

            Assert.That(overriddenMetadata.AssemblyName, Is.EqualTo("Client"), "AssemblyName");
            Assert.That(overriddenMetadata.Name, Is.EqualTo("MyAwesomeClient"), "Name");
            Assert.That(overriddenMetadata.InterfaceName, Is.EqualTo("IMyAwesomeClient"), "InterfaceName");
            Assert.That(overriddenMetadata.Namespace, Is.EqualTo("Client"), "Namespace");
            Assert.That(overriddenMetadata.InformationalVersion, Is.EqualTo("1.0.0.0"), "InformationalVersion");
        }
Ejemplo n.º 8
0
        public void With_AllValuesAreSet()
        {
            var clientMetadata = new TestableClientMetadata();
            var overriddenMetadata = clientMetadata.With("My.Awesome.Client",
                                                         "MyClient",
                                                         "IMyClientInterace",
                                                         "My.Awesome.Client.Namespace",
                                                         "1.2.3.4");

            Assert.That(overriddenMetadata.AssemblyName, Is.EqualTo("My.Awesome.Client"), "AssemblyName");
            Assert.That(overriddenMetadata.Name, Is.EqualTo("MyClient"), "Name");
            Assert.That(overriddenMetadata.InterfaceName, Is.EqualTo("IMyClientInterace"), "InterfaceName");
            Assert.That(overriddenMetadata.Namespace, Is.EqualTo("My.Awesome.Client.Namespace"), "Namespace");
            Assert.That(overriddenMetadata.InformationalVersion, Is.EqualTo("1.2.3.4"), "InformationalVersion");
        }