Exemplo n.º 1
0
        public void New_Null()
        {
            var sut = new RunspaceVariableService(null);

            sut.SetValue <string>(nameof(New_Null), null);

            Assert.Null(sut.GetValue <string>(nameof(New_Null)));
        }
Exemplo n.º 2
0
        public void Gets_Sets_Different_Types()
        {
            var sut = new RunspaceVariableService(fixture.Variables);

            sut.SetValue(nameof(Gets_Sets_Different_Types), (object)0);
            var actual = sut.GetValue <string>(nameof(Gets_Sets_Different_Types));

            Assert.Null(actual);
        }
Exemplo n.º 3
0
        public void Gets_Sets_Same_Type()
        {
            const string expected = nameof(expected);

            var sut = new RunspaceVariableService(fixture.Variables);

            sut.SetValue(nameof(Gets_Sets_Same_Type), expected);
            var actual = sut.GetValue <string>(nameof(Gets_Sets_Same_Type));

            Assert.Equal(expected, actual);
        }