public void ShouldEqualFalse() { // Arrange var connectionString = Helpers.GetRandomConnectionString(); var dbContext = new Context(connectionString); try { Helpers.SetInitializer(new ContextInitializer(SeedContext)); dbContext.Database.Initialize(true); //necessary when not performing query through the EF api // Act var doesIdExist = dbContext.DoesIdExist<Home>("Id", Guid.NewGuid()); var actual = doesIdExist == false; // Assert Assert.IsTrue(actual); } catch { throw; } finally { dbContext.Database.Delete(); } }
public void ShouldEqualTrue() { // Arrange var connectionString = Helpers.GetRandomConnectionString(); var dbContext = new Context(connectionString); try { Helpers.SetInitializer(new ContextInitializer(SeedContext)); dbContext.Database.Initialize(true); //necessary when not performing query through the EF api // Act var doesIdExist = dbContext.DoesIdExist<Home>("Id", Guid.ParseExact("A7FBD140-1CE1-4D6F-9123-29142FDA9E8B", "D")); var actual = doesIdExist == true; // Assert Assert.IsTrue(actual); } catch { throw; } finally { dbContext.Database.Delete(); } }