Пример #1
0
            public void Returns_correct_static_string()
            {
                //Arrange
                const string mimeType = "application/xml";
                var          manifest = DomainUtility.GetPortalManifest();

                //Act

                //Assert
                Assert.Equal(mimeType, manifest.MimeType);
            }
Пример #2
0
            public void Returns_correct_static_string()
            {
                //Arrange
                const string id       = "Id_1";
                var          manifest = DomainUtility.GetPortalManifest();

                //Act

                //Assert
                Assert.Equal(id, manifest.Id);
            }
Пример #3
0
            public void Returns_correct_static_string()
            {
                //Arrange
                const string fileName = "manifest.xml";
                var          manifest = DomainUtility.GetPortalManifest();

                //Act

                //Assert
                Assert.Equal(fileName, manifest.FileName);
            }
Пример #4
0
            public void Successful_manifest_to_bytes()
            {
                //Arrange
                var manifest = DomainUtility.GetPortalManifest();
                var manifestDataTranferObject = DataTransferObjectConverter.ToDataTransferObject(manifest);
                var expectedResult            = SerializeUtility.Serialize(manifestDataTranferObject);

                //Act
                var bytes        = manifest.Bytes;
                var actualResult = Encoding.UTF8.GetString(bytes);

                //Assert
                Assert.Equal(expectedResult, actualResult);
            }