コード例 #1
0
        public void Read_CreatedAndRead1Record_CorrectValues()
        {
            //Assemble
            ProgramTypeModel programTypeModel = new ProgramTypeModel();

            programTypeModel.description = "Advanced";
            ProgramTypeTable programTypeTable = new ProgramTypeTable();

            //Act
            int programTypeID       = programTypeTable.create(programTypeModel);
            ProgramTypeModel actual = programTypeTable.read(programTypeID);

            //Assert
            Assert.AreEqual(programTypeModel.description, actual.description);
        }
コード例 #2
0
        public void Update_CreatedUpdateAndRead1Record_UpdatedValues()
        {
            //Assemble
            ProgramTypeModel programTypeModel = new ProgramTypeModel();

            programTypeModel.description = "Advanced";

            ProgramTypeTable programTypeTable = new ProgramTypeTable();
            int programTypeID = programTypeTable.create(programTypeModel);

            programTypeModel.id          = programTypeID;
            programTypeModel.description = "Regular";

            //Act
            programTypeTable.update(programTypeModel);
            ProgramTypeModel actual = programTypeTable.read(programTypeID);

            //Assert
            Assert.AreEqual(programTypeModel.description, actual.description);
        }