Example #1
0
        public void ThoughtService_CreateThought_GetContainsIt()
        {
            // arrange
            IThoughtService service = GetServiceInstance();
            ThoughtModel    thought = GetRandomThought();

            // act
            service.Create(thought);

            // assert
            Assert.Equal(service.Get(thought.Id).Id, thought.Id);
        }
Example #2
0
        public void ThoughtService_CreateThought_GetAllContainsIt()
        {
            // arrange
            IThoughtService service = GetServiceInstance();
            ThoughtModel    thought = GetRandomThought();

            // act
            service.Create(thought);

            // assert
            Assert.Contains(service.GetAll(), t => t.Id == thought.Id);
        }
Example #3
0
        public void ThoughtService_UpdateThought_TitlesAreEquals()
        {
            // arrange
            string          dummyTitle = "I love bananas!";
            IThoughtService service    = GetServiceInstance();
            ThoughtModel    thought    = GetRandomThought();

            // act
            thought       = service.Create(thought);
            thought.Title = dummyTitle;
            thought       = service.Save(thought);

            // assert
            Assert.Equal(dummyTitle, thought.Title);
        }