Ejemplo n.º 1
0
        public void Manager_AddInstance_GetInstance_Simple()
        {
            ParametersManager parametersManager = new ParametersManager();

            FileParameterDescriptor fileParameterDescriptor = new FileParameterDescriptor("id", "alias", 10, FileParameterDescriptor.FileTypeOptions.Source);

            parametersManager.AddParameter(fileParameterDescriptor);

            Assert.That(parametersManager.Find("id"), Is.SameAs(fileParameterDescriptor));
        }
        public void Manager_AddInstance_GetInstance_Simple()
        {
            ParametersManager parametersManager = new ParametersManager();

            FileParameterDescriptor fileParameterDescriptor = new FileParameterDescriptor("id", "alias", 10, FileParameterDescriptor.FileTypeOptions.Source);

            parametersManager.AddParameter(fileParameterDescriptor);

            Assert.That(parametersManager.Find("id"), Is.SameAs(fileParameterDescriptor));
        }
Ejemplo n.º 3
0
        public void Manager_AddInstance_GetInstance_Advanced()
        {
            ParametersManager parametersManager = new ParametersManager();

            FileParameterDescriptor fileParameterDescriptor = CreateFileParameterDescriptor();

            parametersManager.AddParameter(fileParameterDescriptor);

            Assert.That(parametersManager.Find("id"), Is.SameAs(fileParameterDescriptor));
        }
Ejemplo n.º 4
0
        public void Manager_AddInstance_GetInstance_AutoFixture_Version2()
        {
            ParametersManager parametersManager = new ParametersManager();

            Fixture fixture = new Fixture();
            FileParameterDescriptor fileParameterDescriptor = fixture.Create <FileParameterDescriptor>();

            parametersManager.AddParameter(fileParameterDescriptor);

            Assert.That(parametersManager.Find(fileParameterDescriptor.Id), Is.SameAs(fileParameterDescriptor));
        }
Ejemplo n.º 5
0
        public void Manager_AddInstance_GetInstance_AutoFixture_Alias()
        {
            // DEMO change .GetAlias
            ParametersManager parametersManager = new ParametersManager();

            Fixture fixture = new Fixture();
            FileParameterDescriptor fileParameterDescriptor = fixture.Create <FileParameterDescriptor>();

            parametersManager.AddParameter(fileParameterDescriptor);

            Assert.That(parametersManager.GetAlias(fileParameterDescriptor.Id), Is.SameAs(fileParameterDescriptor.Alias));
        }
Ejemplo n.º 6
0
        public void Manager_AddInstance_GetInstance_AutoFixture_AbstractType()
        {
            // DEMO add IFileData
            ParametersManager parametersManager = new ParametersManager();

            Fixture fixture = new Fixture();
            //..add Register
            FileParameterDescriptor fileParameterDescriptor = fixture.Create <FileParameterDescriptorEx>();

            parametersManager.AddParameter(fileParameterDescriptor);

            Assert.That(parametersManager.GetAlias(fileParameterDescriptor.Id), Is.SameAs(fileParameterDescriptor.Alias));
        }
Ejemplo n.º 7
0
        public void Manager_AddInstance_GetInstance_AutoFixture_Version1()
        {
            ParametersManager parametersManager = new ParametersManager();

            Fixture fixture = new Fixture();
            string  id      = fixture.Create <string>();
            string  alias   = fixture.Create <string>();
            int     maxSize = fixture.Create <int>();

            FileParameterDescriptor.FileTypeOptions fileTypeOptions = fixture.Create <FileParameterDescriptor.FileTypeOptions>();

            FileParameterDescriptor fileParameterDescriptor = new FileParameterDescriptor(id, alias, maxSize, fileTypeOptions);

            parametersManager.AddParameter(fileParameterDescriptor);

            Assert.That(parametersManager.Find(id), Is.SameAs(fileParameterDescriptor));
        }
        public void Manager_AddInstance_GetInstance_Advanced()
        {
            ParametersManager parametersManager = new ParametersManager();

            FileParameterDescriptor fileParameterDescriptor = CreateFileParameterDescriptor();

            parametersManager.AddParameter(fileParameterDescriptor);

            Assert.That(parametersManager.Find("id"), Is.SameAs(fileParameterDescriptor));
        }
        public void Manager_AddInstance_GetInstance_AutoFixture_AbstractType()
        {
            // DEMO add IFileData
            ParametersManager parametersManager = new ParametersManager();

            Fixture fixture = new Fixture();
            //..add Register
            FileParameterDescriptor fileParameterDescriptor = fixture.Create<FileParameterDescriptorEx>();

            parametersManager.AddParameter(fileParameterDescriptor);

            Assert.That(parametersManager.GetAlias(fileParameterDescriptor.Id), Is.SameAs(fileParameterDescriptor.Alias));
        }
        public void Manager_AddInstance_GetInstance_AutoFixture_Alias()
        {
            // DEMO change .GetAlias
            ParametersManager parametersManager = new ParametersManager();

            Fixture fixture = new Fixture();
            FileParameterDescriptor fileParameterDescriptor = fixture.Create<FileParameterDescriptor>();

            parametersManager.AddParameter(fileParameterDescriptor);

            Assert.That(parametersManager.GetAlias(fileParameterDescriptor.Id), Is.SameAs(fileParameterDescriptor.Alias));
        }
        public void Manager_AddInstance_GetInstance_AutoFixture_Version2()
        {
            ParametersManager parametersManager = new ParametersManager();

            Fixture fixture = new Fixture();
            FileParameterDescriptor fileParameterDescriptor = fixture.Create<FileParameterDescriptor>();

            parametersManager.AddParameter(fileParameterDescriptor);

            Assert.That(parametersManager.Find(fileParameterDescriptor.Id), Is.SameAs(fileParameterDescriptor));
        }
        public void Manager_AddInstance_GetInstance_AutoFixture_Version1()
        {
            ParametersManager parametersManager = new ParametersManager();

            Fixture fixture = new Fixture();
            string id = fixture.Create<string>();
            string alias = fixture.Create<string>();
            int maxSize = fixture.Create<int>();
            FileParameterDescriptor.FileTypeOptions fileTypeOptions = fixture.Create<FileParameterDescriptor.FileTypeOptions>();

            FileParameterDescriptor fileParameterDescriptor = new FileParameterDescriptor(id, alias, maxSize, fileTypeOptions);

            parametersManager.AddParameter(fileParameterDescriptor);

            Assert.That(parametersManager.Find(id), Is.SameAs(fileParameterDescriptor));
        }