示例#1
0
        public void CreateAndUpdateProcedure()
        {
            // Arrange
            Token temp = new Token(10, 15);

            DocumentationCoordinationProcedure procedure1 = new DocumentationCoordinationProcedure();

            procedure1.AddToken(temp, 0);
            procedure1.AddResorce(new WorkerResource());
            procedure1.AddResorce(new CadResource());
            procedure1.AddResorce(new TechincalSupportResource());
            procedure1.Update(new ModelingTime());

            DocumentationCoordinationProcedure procedure2;

            // Act
            procedure2 = SaveTester <DocumentationCoordinationProcedure> .StartSaveTest(procedure1);

            // Asserts
            Assert.AreEqual((procedure1).Description, (procedure2).Description);
            Assert.AreEqual((procedure1).InputQuantity, (procedure2).InputQuantity);
            Assert.AreEqual((procedure1).OutputQuantity, (procedure2).OutputQuantity);
            Assert.AreEqual((procedure1).ResourceCount, (procedure2).ResourceCount);
            Assert.AreEqual((procedure1).TokenCollector, (procedure2).TokenCollector);
        }
        public void AsIResourceTest()
        {
            // Arrange
            IResource resource1 = new MethodolgicalSupportResource();
            IResource resource2;

            // Act
            resource2 = SaveTester <IResource> .StartSaveTest(resource1);

            // Arranges
            Assert.AreEqual((resource1 as MethodolgicalSupportResource).Description, (resource2 as MethodolgicalSupportResource).Description);
        }
        public void DefaultTest()
        {
            // Arrange
            MethodolgicalSupportResource resource1 = new MethodolgicalSupportResource();
            MethodolgicalSupportResource resource2;

            // Act
            resource2 = SaveTester <MethodolgicalSupportResource> .StartSaveTest(resource1);

            // Arranges
            Assert.AreEqual((resource1).Description, (resource2).Description);
        }
示例#4
0
        public void AsIResourceTest()
        {
            // Arrange
            IResource cadResource1 = new CadResource();
            IResource cadResource2;

            // Act
            cadResource2 = SaveTester <IResource> .StartSaveTest(cadResource1);

            // Arranges
            Assert.AreEqual((cadResource1 as CadResource).Count, (cadResource2 as CadResource).Count);
            Assert.AreEqual((cadResource1 as CadResource).Description, (cadResource2 as CadResource).Description);
        }
示例#5
0
        public void AsIResourceTest()
        {
            // Arrange
            IResource resource1 = new WorkerResource();
            IResource resource2;

            // Act
            resource2 = SaveTester <IResource> .StartSaveTest(resource1);

            // Arranges
            Assert.AreEqual((resource1 as WorkerResource).Description, (resource2 as WorkerResource).Description);
            Assert.AreEqual((resource1 as WorkerResource).WorkerQualification, (resource2 as WorkerResource).WorkerQualification);
        }
示例#6
0
        public void DefaultTest()
        {
            // Arrange
            WorkerResource resource1 = new WorkerResource();
            WorkerResource resource2;

            // Act
            resource2 = SaveTester <WorkerResource> .StartSaveTest(resource1);

            // Arranges
            Assert.AreEqual((resource1).Description, (resource2).Description);
            Assert.AreEqual((resource1).WorkerQualification, (resource2).WorkerQualification);
        }
示例#7
0
        public void DefaultTest()
        {
            // Arrange
            CadResource cadResource1 = new CadResource();
            CadResource cadResource2;

            // Act
            cadResource2 = SaveTester <CadResource> .StartSaveTest(cadResource1);

            // Arranges
            Assert.AreEqual((cadResource1).Count, (cadResource2).Count);
            Assert.AreEqual((cadResource1).Description, (cadResource2).Description);
        }
        public void CustomTest()
        {
            // Arrange
            MethodolgicalSupportResource resource1 = new MethodolgicalSupportResource()
            {
                Description = "ГорячевНовакова"
            };
            MethodolgicalSupportResource resource2;

            // Act
            resource2 = SaveTester <MethodolgicalSupportResource> .StartSaveTest(resource1);

            // Arranges
            Assert.AreEqual((resource1).Description, (resource2).Description);
        }
        public void DefaultTest()
        {
            // Arrange
            TechincalSupportResource resource1 = new TechincalSupportResource();
            TechincalSupportResource resource2;

            // Act
            resource2 = SaveTester <TechincalSupportResource> .StartSaveTest(resource1);

            // Arranges
            Assert.AreEqual((resource1).Description, (resource2).Description);
            Assert.AreEqual((resource1).Count, (resource2).Count);
            Assert.AreEqual((resource1).Frequency, (resource2).Frequency);
            Assert.AreEqual((resource1).Ram, (resource2).Ram);
            Assert.AreEqual((resource1).Vram, (resource2).Vram);
        }
示例#10
0
        public void CreateEmptyProcedureAsIBlock()
        {
            // Arrange
            IBlock procedure1 = new FixedTimeBlock(100);
            IBlock procedure2;

            // Act
            procedure2 = SaveTester <IBlock> .StartSaveTest(procedure1);

            // Asserts
            Assert.AreEqual((procedure1 as FixedTimeBlock).Description, (procedure2 as FixedTimeBlock).Description);
            Assert.AreEqual((procedure1 as FixedTimeBlock).InputQuantity, (procedure2 as FixedTimeBlock).InputQuantity);
            Assert.AreEqual((procedure1 as FixedTimeBlock).OutputQuantity, (procedure2 as FixedTimeBlock).OutputQuantity);
            Assert.AreEqual((procedure1 as FixedTimeBlock).FixedTime, (procedure2 as FixedTimeBlock).FixedTime);
            Assert.AreEqual((procedure1 as FixedTimeBlock).TokenCollector, (procedure2 as FixedTimeBlock).TokenCollector);
        }
示例#11
0
        public void CreateEmptyProcedureAsIBlock()
        {
            // Arrange
            IBlock procedure1 = new DocumentationCoordinationProcedure();
            IBlock procedure2;

            // Act
            procedure2 = SaveTester <IBlock> .StartSaveTest(procedure1);

            // Asserts
            Assert.AreEqual((procedure1 as DocumentationCoordinationProcedure).Description, (procedure2 as DocumentationCoordinationProcedure).Description);
            Assert.AreEqual((procedure1 as DocumentationCoordinationProcedure).InputQuantity, (procedure2 as DocumentationCoordinationProcedure).InputQuantity);
            Assert.AreEqual((procedure1 as DocumentationCoordinationProcedure).OutputQuantity, (procedure2 as DocumentationCoordinationProcedure).OutputQuantity);
            Assert.AreEqual((procedure1 as DocumentationCoordinationProcedure).ResourceCount, (procedure2 as DocumentationCoordinationProcedure).ResourceCount);
            Assert.AreEqual((procedure1 as DocumentationCoordinationProcedure).TokenCollector, (procedure2 as DocumentationCoordinationProcedure).TokenCollector);
        }
示例#12
0
        public void CreateEmptyProcedure()
        {
            // Arrange
            ClientCoordinationPrrocedure procedure1 = new ClientCoordinationPrrocedure();
            ClientCoordinationPrrocedure procedure2;

            // Act
            procedure2 = SaveTester <ClientCoordinationPrrocedure> .StartSaveTest(procedure1);

            // Asserts
            Assert.AreEqual((procedure1).Description, (procedure2).Description);
            Assert.AreEqual((procedure1).InputQuantity, (procedure2).InputQuantity);
            Assert.AreEqual((procedure1).OutputQuantity, (procedure2).OutputQuantity);
            Assert.AreEqual((procedure1).ResourceCount, (procedure2).ResourceCount);
            Assert.AreEqual((procedure1).TokenCollector, (procedure2).TokenCollector);
        }
示例#13
0
        public void CreateEmptyProcedureAsIBlock()
        {
            // Arrange
            IBlock procedure1 = new ElectricalSchemeSimulation();
            IBlock procedure2;

            // Act
            procedure2 = SaveTester <IBlock> .StartSaveTest(procedure1);

            // Asserts
            Assert.AreEqual((procedure1 as ElectricalSchemeSimulation).Description, (procedure2 as ElectricalSchemeSimulation).Description);
            Assert.AreEqual((procedure1 as ElectricalSchemeSimulation).InputQuantity, (procedure2 as ElectricalSchemeSimulation).InputQuantity);
            Assert.AreEqual((procedure1 as ElectricalSchemeSimulation).OutputQuantity, (procedure2 as ElectricalSchemeSimulation).OutputQuantity);
            Assert.AreEqual((procedure1 as ElectricalSchemeSimulation).ResourceCount, (procedure2 as ElectricalSchemeSimulation).ResourceCount);
            Assert.AreEqual((procedure1 as ElectricalSchemeSimulation).TokenCollector, (procedure2 as ElectricalSchemeSimulation).TokenCollector);
        }
示例#14
0
        public void CustomTest()
        {
            // Arrange
            WorkerResource resource1 = new WorkerResource()
            {
                Description         = "Магомед",
                WorkerQualification = Qualification.ThirdCategory
            };
            WorkerResource resource2;

            // Act
            resource2 = SaveTester <WorkerResource> .StartSaveTest(resource1);

            // Arranges
            Assert.AreEqual((resource1).Description, (resource2).Description);
            Assert.AreEqual((resource1).WorkerQualification, (resource2).WorkerQualification);
        }
示例#15
0
        public void CustomTest()
        {
            // Arrange
            CadResource cadResource1 = new CadResource()
            {
                Count       = 1000,
                Description = "SimSalabimSAPR"
            };

            CadResource cadResource2;

            // Act
            cadResource2 = SaveTester <CadResource> .StartSaveTest(cadResource1);

            // Arranges
            Assert.AreEqual((cadResource1).Count, (cadResource2).Count);
            Assert.AreEqual((cadResource1).Description, (cadResource2).Description);
        }
示例#16
0
        public void CreateProcedure()
        {
            // Arrange
            Token temp = new Token(10, 15);

            FixedTimeBlock procedure1 = new FixedTimeBlock(100);

            procedure1.AddToken(temp, 0);
            FixedTimeBlock procedure2;

            // Act
            procedure2 = SaveTester <FixedTimeBlock> .StartSaveTest(procedure1);

            // Asserts
            Assert.AreEqual((procedure1).Description, (procedure2).Description);
            Assert.AreEqual((procedure1).InputQuantity, (procedure2).InputQuantity);
            Assert.AreEqual((procedure1).OutputQuantity, (procedure2).OutputQuantity);
            Assert.AreEqual((procedure1).FixedTime, (procedure2).FixedTime);
            Assert.AreEqual((procedure1).TokenCollector, (procedure2).TokenCollector);
        }
        public void CreateProcedure()
        {
            // Arrange
            Token temp = new Token(10, 15);

            QualityCheckProcedure procedure1 = new QualityCheckProcedure();

            procedure1.AddToken(temp, 0);
            procedure1.AddResorce(new WorkerResource());
            procedure1.AddResorce(new CadResource());
            procedure1.AddResorce(new TechincalSupportResource());
            QualityCheckProcedure procedure2;

            // Act
            procedure2 = SaveTester <QualityCheckProcedure> .StartSaveTest(procedure1);

            // Asserts
            Assert.AreEqual((procedure1).Description, (procedure2).Description);
            Assert.AreEqual((procedure1).InputQuantity, (procedure2).InputQuantity);
            Assert.AreEqual((procedure1).OutputQuantity, (procedure2).OutputQuantity);
            Assert.AreEqual((procedure1).ResourceCount, (procedure2).ResourceCount);
            Assert.AreEqual((procedure1).TokenCollector, (procedure2).TokenCollector);
        }
        public void CustomTest()
        {
            // Arrange
            TechincalSupportResource resource1 = new TechincalSupportResource()
            {
                Count       = 100,
                Description = "Калькулятор",
                Frequency   = 100,
                Ram         = 10,
                Vram        = 10
            };

            TechincalSupportResource resource2;

            // Act
            resource2 = SaveTester <TechincalSupportResource> .StartSaveTest(resource1);

            // Arranges
            Assert.AreEqual((resource1).Description, (resource2).Description);
            Assert.AreEqual((resource1).Count, (resource2).Count);
            Assert.AreEqual((resource1).Frequency, (resource2).Frequency);
            Assert.AreEqual((resource1).Ram, (resource2).Ram);
            Assert.AreEqual((resource1).Vram, (resource2).Vram);
        }