예제 #1
0
        public void RetrievesSave()
        {
            // Arrange
            var service = new SaveService(_saveRepositoryMock);

            // Act
            var save = service.GetSave("CE7F5AA5-6832-47FE-BAE1-80D14CD8F667");

            // Assert
            Assert.AreEqual("{ \"name\": \"Barack Obama\", \"email:\" \"[email protected]\" }", save.ApplicationState);
        }
예제 #2
0
        public void AddsSave()
        {
            // Arrange
            var newData = new ApplicationSave
            {
                EIN = "30-9876543",
                ApplicationState = "{ \"name\": \"Joe Biden\", \"email:\" \"[email protected]\" }"
            };

            var service = new SaveService(_saveRepositoryMock);

            // Act
            service.AddOrUpdate(newData.EIN, newData.ApplicationState);
            var save = service.GetSave(newData.EIN);

            // Assert
            Assert.AreEqual(newData.ApplicationState, save.ApplicationState);
        }
예제 #3
0
        public void AddsSave()
        {
            // Arrange
            var newData = new ApplicationSave
            {
                Id               = "30-9876543",
                ApplicationId    = "CE7F5AA5-6832-43FE-BAE1-80D14CD8F666",
                ApplicationState = "{ \"name\": \"Joe Biden\", \"email:\" \"[email protected]\" }"
            };

            var service = new SaveService(_saveRepositoryMock);

            // Act
            service.AddOrUpdate(newData.Id, newData.ApplicationId, null, newData.ApplicationState);
            var save = service.GetSave(newData.ApplicationId);

            // Assert
            Assert.AreEqual(newData.ApplicationState, save.ApplicationState);
        }